I have a funny story of the opposite happening to me. This is when I was leading a small team that developed specialized Machine Learning modules for clients. So we have this in-person client meeting (they had decided to travel down to our office), where someone from project management decided to represent the technical crowd i.e. us and the other devs. Since he has done this before he is dressed impeccably in formals, is his charming self, etc. While the meeting is on, and we backstage folks are at work, I suddenly get a ping from him asking to walk into the meeting to explain a specific module. I'm not cleanly shaved, and frankly, shabbily dressed - because well, I had been told I would not be needed in the meeting. So I walk in, describe what they wanted to know in about 2 min, which was no different from what the other guy had said, and they were suddenly convinced!
The phenomena might be general - looking good is one big part of it, but people in certain roles/work functions are expected to have a certain appearance.