restroom door is to think of it as a compromise.
A completely enclosed stall can provide greater privacy, but it may make cleaning, inspection, ventilation, and emergency access more complicated. A stall with an opening underneath sacrifices some privacy while offering practical advantages for facility operation.
Neither approach is perfect. Instead, restroom designers have to decide which combination of features best fits the building and the people who will use it.
That is why you may see very different restroom designs from one location to another. A crowded transportation hub