Iโm not convinced this is necessarily sexism (though I am not saying it is not), mainly because I hear this all the time and I am male.
I donโt do casual Friday and I wear what I call โbusiness gothโ most of the time. I wear dark, dressy pants and a dark, formal collared shirt nearly every day.
I also work in IT where often wearing shoes is considered โdressed up.โ
Most weeks I get the โWhy are you so dressed up?โ Or the, โYou know, you donโt have to wear that. You can wear jeansโ statements about 2-3 times a week, and sometimes more often than that.
Iโm pretty sure that most of my co-workers know I am male, so I donโt think sexism explains that.
I donโt wear jeans. I donโt even own jeans. I wear what I want to wear.
I think humans are just naturally good at singling out anyone different/deviant for attention and covert criticism, although of course this can be combined with sexism.