See, that's the issue. You're basically describing patriarchy here. And you are a victim of it, as many of us. You are being forced to adopt a certain dress code, dictated by someone who thinks a "proper man" should wear this or that. Excepting the women from said dress code could be based on chauvinism ("women aren't as professional/committed/essential as men, so they can dress less professionally", or "women can have a relaxed dress code because they adorn the workplace, while men should project an image of professionalism").