The Japanese are somewhat obsessed with cleanliness. There are some very good reasons for this. Main reason most likely being that it is the primary tenant of Shintoism. Christianity, Islam, and Judaism primary tenants are based on morality and there being only one god. Shintoism doesn't deal with morality. A practical not-religious reason for cleanliness is to stop and prevent the spread of disease.
The traditional Japanese house is set up to represent four levels of decreasing contamination between public and private places. First there is the street which is a public area and therefore most dirty. Then comes the genkan, paved area at same level as garden with a raised wooden floor, which is where people sit and remove their outside shoes and don house slippers. Visitors to a Japanese house many times do not go any further into a house than the genken, this helps prevent the intrusion of dirt into private areas of the house and allows it to be swept into the garden or street. The next level is the wooden corridors between rooms where you walk with your house slippers on. The final level and most clean part is the tatami-matted rooms (tatami - Rectangular mats used as floor coverings in a traditional Japanese room. They are made of tightly woven rice-straw covered with woven rush grass with the edges hemmed with cloth. Standard size is 180 by 90 centimeters and 5 centimeters thick). Slippers or shoes should not be worn in these rooms. These rooms are used for eating and sleeping.
Lavatories and bathing areas are separate in Japanese houses. Since bathing and cleanliness are important to the Japanese toilets are kept in their own room away from the bathing area. The toilet room is positioned so as to reduce smells and social embarrassment. When entering a Japanese lavatory in a house you take off your house slippers and don slippers used only for that room. Lavatories in houses are always well ventilated and often contain a flower arrangement.