The idea behind this this practice is that you want to leave dirt outside of the home or temple. This is particularly annoying for tourists who wear their laced sneakers and socks or strappy sandals and who have to take them off every time they enter an inhabited space and then put them back on, every time they leave. It is not unusual for people or children to walk barefoot on the streets.