Those large gaps under public restroom stall doors can feel awkward, especially if you value privacy, but they are usually there for practical reasons rather than poor design. One of the biggest advantages is easier cleaning. Restroom floors need frequent mopping and disinfecting, and raised partitions allow cleaning equipment to move underneath without every stall door having to be opened separately.
Safety is another important reason. If someone becomes ill, faints, or needs medical assistance inside a locked stall, the gap can make it easier for staff or emergency responders to notice that something is wrong and gain access. It can also allow someone inside to crawl out if a lock jams. In busy public spaces, that added visibility may help staff identify problems more quickly than they could with fully enclosed cubicles.