It is an irrational fear that people experience when they realize they are in a confined space, which is known as claustrophobia.
There are a lot of people who suffer from claustrophobia. They try as much as they can to avoid confined spaces that make them feel uncomfortable, including elevators, tunnels, underground stations, and public toilets. This is because these spaces make them feel uncomfortable.
Hope this helps :)