I don't know where the tradition came from, but when I was a little girl, I was told that it was proper etiquette for men to take off their hats when entering a building. I always try to respect older people, even though things like this are acceptable in today's generation. (Older people deserve our respect.)