The custom of removing one's shoes before entering the house is believed to go back over one thousand years to the pre-historical era of elevated-floor structures.”
On an unrelated note, because of the genkan doors in Japan open outwards, while in Australia they always open inward. On the other hand, Australia toilet cubicles open outwards while in Japan they (usually but not always) open inwards, so if you’re in a squat you have to stand between the squatter and the wall, lean over the bog and pull the door in before holding it open and jumping out over the squatter while trying not to get your shoes wet.