There's dress codes, and there's dress codes. I think most institutions should have some form of dress code. For example:
Do I really have to look at someone's hairy legs or toes or arse when they sit to close to me in a meeting?
Do I have to listen to the flip-flops someone is wearing as they walk past my office 20 times in 10 minutes?
Do I really need cleavage distracting me all day?
So, maybe some minimal dress code makes sense and can prevent embarassing situations or situations where other's are made uncomfortable by someone else's clothes (or lack of them).
But, having to wear a suit & tie everyday, or khakis & shirt/polo shirt, no thanks.