One of the worst things about certain jobs is the requirement to wear a uniform. It can make you feel like a monkey in a suit, all dressed up for someone else's enjoyment. I understand that it's necessary for safety in some instances, but it can feel dehumanizing. The worst though, I remember from my school days, was when the weather clashed with the uniform. Wearing ballet flats did not exactly jibe with a historic blizzard. Ah, the price you pay for conformity.
I believe that you should be able to take whatever liberties you need to in order to stay comfortable. After all, we're more likely to do a good job when we're at ease. But I don't make the rules, alas. But I can at least defend the author of a recent Reddit post, who complied with the dress code rules and still got reprimanded. You can't do anything these days!