Bathroom doors are usually off a small hallway, sometimes a busy one. By design, they don't have windows.
So you run the risk of hitting people with the door. Also, you will still need to interact with the door to open the lock. Having a door that unlocks if you push on it would be a bad thing for people who use the bathroom with their children.