I'm not sure, for what I've read, how clear the dress code, and the specifics were. Plus when bargaining on things that were probably of much greater priority, that was something that was sacrificed in a lot of ways.
There could have been a mere agreement in principle without a lot of specifics, I dunno. But that sounds like something the players union, if no one else, should have been sure to make clear.
But even so, there's still the issue where this issue should never have had to be a contract table issue only. As Mark Cuban noted, it should have been discussed through the proper team channels where, if nothing else, they could have put the onus on the players to come up with a "professional" dress code they could agree to of their own making that would not be at odds with the image the league wants to have.
It's just bad management, all the way around.