For years I've been advising the world to drop their insistence on arbitrary dress codes, but they haven't accepted my advice. Personally I think it's a diabolical liberty to give anybody a hard time just because they don't obey dress code rules. I mean who decides these things anyway?
I've been told that the reasons for them are about showing identity with a particular group, or showing willingness to obey an authority. As I've never felt particularly willing to obey an authority, I can't relate to that. As for identifying with a particular group, well maybe in some circumstances, but if some members don't want to do it, I don't like the idea of forcing them.
Advocates of compulsory school uniforms say that it makes it impossible for peer pressure to dress in a trendy way. They also say a lot of other things to do with pride and a feeling of identity with the school, but they don't really explain themselves very clearly. I'd have thought that to dictate what people wear would require strong evidence, and last time I looked there wasn't much of that.
But I'm OK with uniforms if there's a good practical reason, such as people easily being able to recognise a policeman as such.
As for the looking good or looking smart thing, so many people dress in a way that makes them look ridiculous to me that I can't relate to that at all. Visual aesthetics are in the eye of the beholder.
I'm fiercely libertarian and I don't approve of pushing people around unless there's a damn good reason. So, for my money, dress codes can get stuffed.