In codes written before GFCI, making sure you can't electrocute yourself by accident could be achieved by:
a) establishing a minimum distance between the sources of water and electrical switches that would have to be measured, inspected carefully, be expensive to re-do, and possibly not be practical inside a small bathroom, or
a) establishing a minimum distance between the sources of water and electrical switches that would have to be measured, inspected carefully, be expensive to re-do, and possibly not be practical inside a small bathroom, or
b) requiring the switch to be outside the room
Some locales chose b, and never updated.