Personally I have never been asked to remove my shoes before entering a home. If at any time anyone would ask me to, I would be very happy to take the shoes off, and the socks too, being that I hate shoes & socks so much. As it is now I go to friends barefoot anyway.
I think it is a respectful way to show you care about the home owners clean carpets, and cleanliness as a whole, and entering with shoes which have been on the road, will create the need to clean after you somewhere after you left.
For more about this open this link