But at the same time, having a dress code could let people worry less about their attire and be able to focus on other matters.
Here I'm thinking specifically of school uniforms. It can be easier to be able to just wear the uniform rather than having to choose what to wear every day.
That said, I probably wouldn't like to work at a place with an overly stringent dress code.