I had a boss tell me flat out...
I didn’t hire you for your boyish good looks, or your GQ style of dress... I hired you for your mind..
When it stops working, so do you.
Prior to retirement, I managed a small organization that included several software engineers. During the hiring interview process, I always stipulated that there is a dress code that all my team followed. If you wanted to work with me, you followed my rules. I had a waiting list of folks that wanted to be part of my team.
The person that replaced me was a BIG fan of that policy, and continues it to this day. She also has a waiting list.