The children take off their shoes when they enter our house and most other houses. We parents do too. Why? Mainly because it is the accepted polite thing to do, and because it keeps from tracking dirt into the house.
They keep their shoes on in the street and in other public areas. Why? Because we live in a city of millions and we think it would not be hygienic or safe for them to go barefoot on the sidewalks, streets, subways, buses, etc.