There are etiquettes that when you enter a worship area in all religions, you are required to take off your shoes before you enter any spiritual place. It is better to remove them in your car or a vehicle or give to an authorized shoe keeper otherwise all the time; the shoes will remain in your mind when you are visiting the temple.
The Thai etiquettes involve before you visit a Thai temple, you remove shoes, hats and sun glasses. You also turn off your mobile phones and lower your voice. In our Gurudwaras, you are supposed to remove your shoes and cover your head before you enter the holy place.
A house is also considered a temple, therefore, when you enter your house, you take off your shoes at the gate.
Removing the shoes has both medical and spiritual reasoning. The medical reasoning is that your shoes invariably carry infections and dirt from outside and can infect both the home and temple atmosphere. It can end up into a disease. In a temple where large number of people visit, it is important to provide a safe and hygienic environment.
Removing shoes also has a spiritual reasoning. In mythology shoes represent your perception towards dirt and dirt in mythology basically means mental dirt. In any Shiv temple, Nandi is always worshipped outside the temple. Nandi represents sexual desires which mean that you should never enter a holy place with sexual desires in. That is the reason why pilgrimage places are never used for honeymoon. Similarly, removing your shoes means that before entering a temple, you take away your negative thoughts. You cannot enter a temple under anger, aggressiveness, cynical behavior or anger or hostile behavior. You are not supposed to abuse inside a temple.
It is said that even if you are angry, the temple atmosphere still makes you calm. Removing your shoes
outside temple means a type of Pratiyahar as mentioned in the Yoga Sutra Patanjali which is start of a new journey by keeping your negative thoughts out and then entering the temple premises with a positive state of mind.
Removing your shoes also makes you bend which also teaches you to remember that to acquire inner happiness, you need to learn to bend first. In a temple, you learn to bend which you do by touching your head on the floor or on the Lotus Feet of the God.
Ideally, you are not only required to remove the shoes but also wash your feet. Washing of feet is essential in Islam which again is both for physical hygiene as well as in Vedic terms washing of feet means removing your mental negativity by starting thinking positive. Here flow of water basically means a continuous flow of positive thoughts. Ganga or any holy water in mythology depicts flow of positive thoughts.