Have you ever gone pee on an airplane? It's a fair question, not everyone has. But if you have, you know the drill. You wait impatiently in your chair for the turbulence signs to be turned off. You carefully watch for the little "occupied" lights to be turned off. You disentagle yourself from your seatbelt, your carryon and the seat back from in front of you. You squeeze yourself through the aisle to stand in full view of a plane load of people who you can tell are thinking "I wonder how bad he has to pee?" and then "Huh, I wonder if I should pee?" You wait patiently for the person occupying the closet...I mean...toilet to open the door so that you can do a dosidoe worthy of the best squaredancers anywhere. Then you squish yourself in, bracing against the movement of the plane as best you can. Once in the room, you close the door, drowning you in dreary darkness until, finally, you slide the door lock home and, praise the Loard, there is light.
By this point, all you want to do is blessedly have a pee. So I'll forgive you if you haven't considered the lightswitch in an airplane bathroom. You haven't, have you? Every day we are influenced, cajoled and otherwise pushed towards actions that other would like us to make. Most are frivolous, but some are there because of the greater good. We are forced into taking actions because it makes it easier for all those that follow us to do what they need to do too. Think about the airplane and that little "occupied" light. In an airplane, it is important that the aisle not have huge queues of people milling about. With just a few people stading waiting to pee, the safety and more importantly the drink service is completely compromised. So the occupied light allows people to minimize that disruption.
But how, as a plane designer, do you get people to turn that light on? Well I suppose you could put a pressure plate in the floor, but people sitting down might lift their feet (best not to picture that one). You could put a switch on the wall, but odds are that in their haste to pee, people would just forget to turn it on, or worse, forget to turn it off on the way out. So how do you ensure that people do the right thing? You turn off the lights unless they flick that switch. But you can't just have a "lights and occupied" switch, because on the first flight you'll have mister "I prefer to pee in the dark" in 4A. By integrating the light switch, the "occupied" switch and the door lock now you've got a realatively fool proof system.
As in all things, if you need someone to do something, make it concomitant with something in their best interest. Most people don't like to pee without the door locked. Or in the dark. They get lights and a locked door, you get an occupied signal. If you can sit down and figure out, in your business, what you need your customers to do, and then figure out ways to tie that activity to things they want to do, in the end you both win. If only it were that easy.