@maxdancona,
I agree that there are differences in work places and adaptability is key. No arguments here.
However, the degrees of "casualness" and "openness" absolutely differ from place to place.
Over 20 years ago, I practiced law for an insurance company in NY. One of my fellow female attorneys came in one day in pantsuit. We had had a blizzard. She was sent home to change, as it was inappropriate.
12 years ago, I worked in a large insurance company in Boston, in the Legal Department, but doing IT work. I wore chinos to work. While I was not sent home to change, I was told in my next review that it was not dressed up enough. I left not too long afterwards, and went to a financial services company. I did nearly the same kind of work, and wore the same clothes. No one batted an eye.
2 years ago, working for a robotics startup, we all wore jeans and sneakers or sandals. Hell, the guys I worked with rarely showered (yes, I knew this). In my jeans and clean sneakers, I was the most formal person there. I did marketing work and, when we went to events, I would wear skirts. It was a victory to make sure all of my coworkers were at least clean and deodorant-ed up.
In the first place (20 years ago), a discussion of politics or religion was a bad idea although not a cause for dismissal or censuring. The boss was a fairly free-wheeling guy, particularly for a lawyer. The firm I had worked for right before that was old-school Irish and we called the partners Mr. __ and Mr. __ (no female partners, what, are you nuts? This was 1986). Talks of politics and religion would have gotten you a good talking-to.
A dozen years ago, we didn't talk politics and religion and the like because we were too damned busy. It was a database transfer, a part of the aftermath of Y2K.
Two years ago, we talked about whatever.
But, bottom line, standard company protocols usually push in the direction of some restrictions. And the software development scenario is a rather narrow one - in large companies, the software dev department isn't as casual as all that. So you could be a Java Programmer in two rather dissimilar environments, depending upon where the work was being performed.
There are also restrictions based upon laws or their interpretations. Financial services, legal or insurance work often means client confidentiality. In the health care field, it's even more extreme. In an incubator-style environment, you often have trade secrets and/or nascent inventions that need to be protected. And every company has to deal with keeping sexual harassment out of the workplace.
The software dev environment you are speaking of also arose because of supply and demand. If there aren't a lot of competent Java scripters, then management will cater to them more. And having a looser working environment is a cheap way to do that (have you worked in a company with a ping-pong or foosball table? I have - and, frankly, I'd rather have the money). But if the number of Java developers became greater, if the market were flooded with them, most management would be a lot less free with the perks and a lot stricter about behaviors.