Why do people keep their shoes outside the Temple?

People leave their footwear outside not only while entering temples, but also their own houses. Going into the temple or any other place of worship is the best way to cleanse your body and soul.

Khatu Shyam temple

People leave their footwear outside not only while entering temples, but also their own houses. Going into the temple or any other place of worship is the best way to cleanse your body and soul.

In almost all the holy places of worship, it is believed that the cosmic energy from the cosmos is swirling around, by virtue of the place being a meeting point of energies, or by virtue of continued practice of prayer/meditation/ rituals/etc at that point in the temple or place of worship.