I'm staying at my inlaws this weekend. They don't have a lock on the shower room. I have a lightning fast shower, terrified of FIL walking in the entire time. He wouldn't do this on purpose but my kids would fling the door open without a second's thought of anyone else being nearby.
I was at a BBQ last year with about 20 other people. No lock on the bathroom door. Had to wee as quickly as possible in fear.
I think a lock, or some other method of indicating the room is occupied, should be a legal requirement punished with a fixed penalty fine of £100 or unlimited fine and 3 months in prison if the lack of lock results in someone seeing your bum.