Try entering a Mosque without covering your head. Forget about Mosques, go to a Gurudhwara without covering your head, can you?It is not unusual for temples to have dress codes. It preserves the sanctity of the place. If you have any problem,just dont visit,its as simple as that.