The house I grew up in had a switch like that on just one of the bathrooms, the tiny one. From everything I have been able to gather, it had to do with electrical codes and requirements that switches had to be a certain distance from water.
Take that with a grain of salt because this bathroom also had the light fixture over the sink with a socket for a razor or hair dryer plug, and it seems way more hazardous to me.