I believe that the prohibition of placing panels in bathrooms was based on concerns over working space and corrosion, encouraged by the greater humidity.
The code rule came about after an aggressive campaign by Joe Tedesco, who posted plenty of pictures of decrepit panels in bathrooms. That most of these locations were both in the shower, as well as in 'illegal' bathrooms added to places like basements- and that the baths also violated other codes (like the mechanical code's ventilation requirement) were points that Joe did not address.
Look at the existing bathroom in my house, and you'll find an extremely cramped layout. There is simply no place that is not obstructed by a plumbing fixture. The 'best' space is between the front of the toilet and the side of the tub, and is about 24" wide. Still too little working space. This is common in bathrooms.
At the opposite extreme, one McMansion I worked in had a 'main bath' that was large enough to roller skate in. The counter held three sinks and was easily ten ft. long. With all the lighting, the hot tub, the heating, etc., it could very well have filled a small panel all by itself. The bathtub itself needed two GFCI circuits.