My job doesn't have a dresscode, but I still wear a suit and tie to work.
That said, if my company started forcing a dresscode to and from work, yea I would throw a fit.
The dress code for NBA players at work is sneakers, a jersey and shorts.
This is for when they are not working but on the way to work and back or if they injured but appear at the games.
The media isn't waiting for you in the parking lot, though. My understanding is that the code is for when they are working.