You get at an importent point. However, it is important to add Richard Hamming's orthogonal idea: "I wasn't dressing properly. I had to make the decision - was I going to assert my ego and dress the way I wanted to and have it steadily drain my effort from my professional life, or was I going to appear to conform better? I decided I would make an effort to appear to conform properly. The moment I did, I got much better service."
Contexts in which dress matters may disproportionally be contexts to avoid, but there are contexts that are worthwhile in which dress is very important.