I've been living in Red Sox Country for over 45 years and have noticed that more often than not bathroom light switches in homes around here are located outside the bathroom, while the light switches for other rooms are located near the door opening inside the rooms they serve.
Our own home, built 19 years ago,has the bathroom light switches outside the bathrooms.
I've assumed that had something to do with codes from earlier days requiring that any line power electrical apparatus be far enough away from sinks and bathtubs so you couldnt touch them when some part of your body was in contact with a plumbing fixture or immersed in water. That sort of made sense to me when thinking about earlier two wire systems where switch plates weren't grounded and a fault in the switch or a poorly insulated splice touching bare metal could make the switch plate hot.
A friend who has been a Massachusetts licensed master electrician for 30 year told me there's nothing in the present code preventing light switches from being mounted inside bathrooms, and code required GFCIs have allowed outlets to be located near sinks in bathrooms for some time now.
Can someone confirm the reason why I see so many bathroom light switches outside the bathrooms they service? Maybe it's just that old traditions die slowly.
I think those outside light switches are troublemakers for at least two reasons. One is that guests are less likely to turn the lights off when they finish using the bathroom if they don't see a switch in an expected location, and the other is that it's no fun to be sitting on the pot after dark and have some nasty child come along and turn the lights out on you. (Yes, I can find my own ass in the dark; It's the TP I have to fumble around for. )
Jeff