What if the dress code your boss gave you, was to be applied when you weren't working?
Give me a break! These guys are multi-millionaires who represent the league to the paying customers. Nobody is telling them what to wear at home. They are being told that there are minimum standards for appearance when they are on team business. Basically, if there is a chance they're going to be on camera, they need to look professional and not like a bunch of pimps. That includes traveling to and from games, at press confernces and events, etc.
The league has every right to impose that and it's not out of line.
That depends on how valuable the job was to me. If I'm getting a ton of money (by anyone's measure) I could expect that I may be required maintain an image that would promote my organization.
If I didn't like it then I could take my talent elsewhere. For someone in the NBA, that's not easy to do. I know that some recording artists as part of their contract must maintain certain 'public appearance standards'.
If your typical 2nd grade school teacher on their own time ran a string bikini hot dog stand. You'd have many people screaming of inappropriateness.
If a person doesn't like the terms they are free to go park cars, become an accountant, run their own business.
If it were me though, I'd dress in the finest suit I could find. But then again I wouldn't pretending to be a thug.