On a slightly different note, I was introspecting on this very issue of late. The way one dresses also expresses the way one feels or, put in reverse, one feels the way he/she dresses.
Dress Code and Employee Comfort in IT/ITES
In IT/ITES, there are a myriad of job roles. However, in those businesses where knowledge work is of prime importance (your brain needs to roll), it is important to have our employees feel at ease at work. A dress code may probably put them at discomfort. People feel important when they dress in a particular sense... some feel so with formals, some with semis, and others with perhaps cool beachwear. The point is, with a minuscule exception of say when there are meetings with higher-ups, conferences, etc., employees should be free to dress the way that makes them comfy. On exceptional occasions, having a formal dress would result in an ethical and professional outlook. Physical comfort culminates into mental ease to work...that's what counts.
However, every company, depending on the kind of work they do and of course, the senior management team, would decide on what's best for them. Hence, some do implement a dress code policy, etc.