I already do, and it hasn't stopped me from getting a job, and thankfully I haven't ran into megalomaniacs of their own little space who think because they have a house that they need to make pointless and pedantic rules like taking one's hat off inside. Certainly I wouldn't bother being around this type of person so affixed on someone else's clothing to begin with.. they'd be better off inviting one of those clothing store mannequins instead which they can dress up any which way they subjectively feel like.
The last time I dealt with this kind of attitude was in high school, and let's just say that for all the individuality high school parades around for promoting, they certainly are in the business of social and behavioural engineering for all the wrong reasons.
It's great you got a job without removing your hat for an interview. Good for you. But really nobody consciously thinks about it. Most are so ingrained with this social norm that subconsciously will automatically reject someone as a "hire" when interviewing several people equally qualified for the same job and one doesn't bother to remove their hat for the interview. It's really not something they think about but it registers somewhere deep within and the chances for hire decrease with each social taboo that one commits. Of course there are some jobs where even the boss might wear a hat such as construction. So, if someone feels strongly about wearing a hat at all times, that might be the best job for them.
Certainly, when you're a guest in someone's house, you're tacitly agreeing to follow their house rules, which is fine in principle.
I guess the question becomes why anyone would have rules such as removing your hat or keeping your hands out of your pockets.
I agree that a man's home is his castle, etc. and I agree with the principles involved, but why? Why on earth would someone wearing a hat in your house bother you?
Why doesn't really matter so much. I mean I don't care if you wear a hat into my home and leave it on and I don't mind if you feel more comfortable wearing your shoes into my house (some folks have a rule about no shoes in their home) but if you sit down to eat a meal I've cooked all day I would like if you removed your hat and I might ask you to do so. The mere fact that it's what the hostess asks of you should be enough without needing to explain why. And for goodness sake don't use a knife to remove jam from my jam or jelly jar.
Now, you would have the right to say you would rather not eat the steak I just cooked for you than to remove your hat and so be it. But it is just as fair for someone to ask why you would be offended by removing your hat as it is to be offended by someone having that house rule. Manners mean a lot to some of us because it has been pounded into our heads since we were born. Don't chew with your mouth open, don't fart at the dinner table, don't sit at the table without a shirt or with a hat, don't play with your food and don't slurp your soup. Offer to assist with the dishes when done.
Remember it's your choice if you come to my house or not, it's my choice if you stay or come back. I dare say I've never had anyone ever refuse to take their hat off at the dinner table nor use a spoon in the jelly jar instead of a knife. and nobody turns down dinner at summer's house because they love it. In fact most ask to come back, rules and all. BTW, I don't have many rules.