Similarly in the military. We got un-booted at bedtime, and put them back on when we got up the next morning. Even in the barracks, including the nice ones that were reasonably nice apartment buildings, I never took off my shoes to walk around my room or when visiting someone else's (and vice versa; no one took off their shoes to visit me).
The first time I bumped into that rule was when I met my wife, who'd moved to the area from New York. I was quite confused when she asked me to take my shoes off at the door, and more than a little anxious. Sure hope I'm wearing decent socks and my feet don't stink, lest I be traipsing dirty feet around her apartment. To this day, I'm not convinced that hardsole shoes that haven't walked through wet messes are substantially dirtier than a damp sock that's been inside a shoe all day long.