It's an interesting thread, because for example, I live in a small country in the middle of Europe...
And in my whole family, this is obvious to take off your shoes when you enter someone's house. Next to the door we have a small carpet where you take off them, and after that you leave there or we put them into a small ... armoire (?? I don't know the right word).
We usually do this in my whole family, and most of my friends' family, but we are not Japanese...
So I think this isn't only Japanese 'thing'