When we started the the game we thought about YorHa as a militiary organization, with the purpose of killing robots, we now however have a very much a broader idea of what it is and who is among them.
The purpose of YorHa is to appear as official as possible, to create the lie that the humans are still alive and on the Moon.
In that sense, having a flashy look, even at disadvantage for praticality, is a plus.
They need to be noticed, they need to be known and their motto "Glory to Mankind" be spread so that the lie reach as many androids possible, until their planned demise.
That said, I belive that some kind of dress code is in the YorHa guidelines, and I also belive that like many of their rules is just ignored.
That's down to who are the YorHa soldiers.
We learned that the black boxes are created from machine cores, and we know how prone to emotions machines actually are.
They just needed to look official enough, not to actually beign able to keep up the act forever.
They are flawed as a group because their core is itself built to feel strong emotions, regardless of their rules.
That's the theme of most of the secondary quest related to YorHa, they are all massive emotional fuckups that can't actually hold the act for very long.
2B's is relatively more stable than others, that's why the outfit do a lot for me to explain the character.
It's her escapism, the form of breaking the rules she concedes herself as a very emotional beign confined in a emotionless role.
It's probably reaching a bit, but after knowing the whole story, it is more fitting, at least to me.