Well, that's the whole point, isn't it? And I'm sure @Keeptoiletssafe has already explained it to you.
If there's a gap under the door, then if someone sees you have collapsed, they can try to rescue you. Then call an ambulance if necessary. Last time I had to call an ambulance, last year, it took 90 minutes to arrive. And I was in a city at the time. If the toilet is more rural, it can take even longer.
If there's no gap under the door (such as in fully-contained floor-to-ceiling cubicles or in a single toilet room) and you collapse, it's likely that no one will know, and it could be days before you are found, unless you have your phone, it's working, and you are able to call someone.