The codes are written for the 'what if' situations after lots of experience...they sometimes change as new materials and experience dictates. The shower drains all used to be 1.5", and there's a lot of them still out there, working okay. But, they found that some 'what if' situations could be bypassed if it was increased to a 2" pipe, so that's what the new codes generally require. A tub with a shower, is still a tub, and 1.5" works since it has an overflow and a lot more room for water storage before it can overflow a curb and into the room.