I wouldn't dream of asking anyone to take off shoes. It's nothing to do with hygiene, unless you expect your friends to sit in the floor, and as far as manners go, I think it is their responsibility to wipe their feet, but rather rude to expect them to change shoes.
These days, unless you live on a farm, or your only visitors drop by after an off-path ramble, the chances of treading in animal droppings are slight. People pick up after their dogs and cats bury theirs. What else are you going to find on shoes?
I think it probably does have roots in a class thing, in that those with maids to do the cleaning didn't need to bother about things like that, and the less well-off had enough scrubbing and cleaning to do without making more work, but these days everyone has a vacuum cleaner, so it might be one of those handed down traditions that has lost its roots.
I can understand that if children are running in and out they might make a mess, but if someone asked me to take my shoes off I would wonder what else was part of their strange code of 'manners'. It would make me feel like Hyacinth's nervous friend who spilt her tea every time she was spoken to
.
In short, I would rather live somewhere that people feel welcome than in a showhouse with nervous (or very few) visitors.