Why don’t toilet doors also latch and change their status when closed? [closed]

On aeroplanes when the passenger closes the toilet door it keeps the door closed and changes the status to occupied in a separate (or sometimes the same) action as closing the door. I am wondering if there are any specific reasons that this design only applies in public transport but not in buildings.

It seems logical that when you close the toilet door there is no reason for it not to remain closed and the status changed to occupied, yet I have not seen such designs for toilets inside buildings.