Military people wear uniforms to enforce the idea of unity. Business people wear suits to show they mean business. Yet I've only worn a suit one day as a programmer and that was my first day ever back in 1981.
I got a migraine and had to go home at noon. Not a great start to a career. But I came back the next day sans coat. Over the next few months I ditched the tie as well. For the next 3 years I worked at a defense contractor as a programmer but the only one without a suit or tie. Somehow they tolerated me, probably because I did a good job at everything. Or maybe they forgave my youth. Or thought I knew someone important.
I've always said that if a computer would work better if I was splendidly dressed then I would go Armani. Of course that's stupid, it doesn't care, and neither should anyone. It's not that I am some kind of stereotype ponytailed geek who rarely changes clothes either (these days I have little hair anyway). I prefer to wear jeans and a golf shirt. At my current contract they only allow jeans on Fridays.
That of course is utterly nuts. If jeans are OK to work in on Friday, why not every day? Who decided this made any sense at all? None of us deal with a public demanding formal dress anyway.
I'd rather be comfortable and be able to focus on writing good code since that's what I get paid for. One time I worked for a backward company where my white walking shoes were banned and woman were required to wear hose or they were sent home. That was only something like 12 years ago too.
Suits as we know them today started in the late 19th century and were originally called lounge suits yet today some people wear them as if anything less would be barbaric. I still find seeing our Congresspeople standing around in suits looking like some kind of clones as funny. I would rather they were required to wear shorts, tank-tops and flip-flops; imagine how much more reasonable they would be as you can't be pompous dressed like that.
Different cultures have different ideas of what is "formal" dress. In Bermuda they wear suits but with shorts of course. In many parts of the world robes are the preferred clothing; I can't imagine coding in a full length flowing robe! Then again I haven't tried either. Maybe a kilt?
The idea behind the "suit" is to enforce sameness; everyone looks stupid but splendid and so no one will stand out. During Mao's time in China everyone wore the same blue suit which at least looked sort of comfortable. Everyone was supposed to be identical.
But being identical is not what you should every be as a programmer. This isn't a profession where you should only be willing to do what the crowd says, follow the strict standards you are given, never to try a different approach. Our industry thrives on finding new and better ways to do everything, even if it sometimes leads us on the wrong path.
When I started I had lots of choices on what programming language to use as long as it was Fortran. Today there are countless languages, processes, frameworks, libraries and the like because someone had the idea to branch out and try something different.
If we all wrote in one language in an identical way and never wavered from our formal standards none of the amazing things we see every day would exist. Programmers by nature have to be seekers and often explore every idea that comes along to decide if it has merit or not. It doesn't mean you have to follow every new idea and never do the same thing twice; it's about never having fear to try even if it doesn't go anywhere. We are not a bunch of uniform (and uniformed) people and that is the strength of a good programmer.
I've always said I don't think outside the box, I'd rather not have a box at all. Sometimes the right thing to do is not the new and sometimes you have to toss out everything and go a different way. It's the mentality that matters.
So don't let some cloth constrictors force you to follow the straight and narrow thought. Branch out and learn and try new things. But do it in comfort.