I was interviewed at a picnic table for a job in tech by a guy in flipflops and bermudas once (not the smart ones, the garish ones)... he had a couple of PhDs, and was a very nice chap as well.
In another job (also tech) they'd send an email out when the summer dress code came into effect and women were allowed to stop wearing tights. Men could wear shorts if they desired. Some did on hot days.
Dress codes really should be sex neutral. Choose what's allowed (lower legs covered/uncovered etc, hair on head/face to be groomed/tied back/whatever). So what if some bloke wears a skirt.
Personally I think that what's being skipped over here, is that women were expected to dress in skirts and nice blouses/dresses because when they were first let into the office, at least part of their job was to look pretty. And whilst this is now recognised as sexist, there's a lot of patriarchy still about, so women dressing prettily is still encouraged. My MIL got given money from petty cash and told to go out and buy herself some high heels for work once - despite that part of her job was site visits, they didn't approve of her wearing practical clothes to do that.