We were formal, but had gone business casual a few years earlier.
One of the first mandates of the new management: Business attire. Fortunately, in my role, I could skip the full suit, but dress shirt and tie, and "Dockers" and similar more casual slacks were expressly verboten.
If you didn't like it, good-bye. Since they were looking at wholesale reductions in head count, they couldn't care less.
My office was very "back end". I doubt I saw more than one or two external customers a year. Wages were simultaneously frozen, so you knew where the additional wardrobe expense was coming from.
Sure, this is pure anecdote. Just my experience. I've been at and watched other companies struggle with the "clothing" question. It inevitably seems that, in doing so, they are worrying about the wrong question. (And inevitably, the ramp up of formal dress seems to come along with hard times... That have nothing, in my opinion, to do with what people are wearing.)
Then again... maybe for the majority in mainstream corporate America, being made to put on a suit is a signal to "stop fucking around". Because, that was part of the problem.
P.S. Since I walk around a lot, despite my relatively short remaining tenure, I still managed to wear out a few pairs of rather nice dress slacks and put some significant mileage on dress shoes, before I got out of there.