Employers who have people who are customer facing can and should project whatever business professionalism they think is appropriate. That means dress code and also speech guideline (see, they wouldn't allow the type of language allowed in here). Within the parameters of their own internal enterprise, the dress code and speech is regulated as an employer sees fit for a professional behavior they desire, above and beyond what are considered HR norms (hate speech, racial slurs, libelous commentary, sexual harassment, et. al.). Then there is business decisions where there are accepted relaxation of professional norms (at least those seen from days of yore). That is how we got business casual Friday and now, that is not even the exception but the norm in some places where customer facing (external) is not common at the home office (travel to the customer site is different). Nor is peer-to-peer professionalism defined by business attire... performance of one's job is what defines the professionalism.
It is commonplace and accepted and more and more companies are going to go to this sort of enterprise-wide acceptance. Now, even the acceptance of home office workplace is common and there is no dress code there. In fact, when some are summoned to make the trek to the office from a "working from home" day because an emergency or presence of said individual is necessary, the common thing to see is the person's casual attire is coming right along with the person. I've seen bermuda shorts and t-shirts in these sort of last minute meetings and while the dress code is generally known as business casual, it is anything but and rarely enforced amongst the peer-to-peer interaction. And nobody cares.
So Hanley Ramirez does not understand that the Marlins wish a certain projection of professionalism because there is quite a bit of customer facing for these guys (re: fans, who ironically are probably dressed in anything but a professional manner, heck some even wear Puma outfits... but I digress). So he needs to pick the battle correctly with his management, because this one is not the one he wants to fight. Perhaps the Marlins should also tell their players that scratching, spitting and cursing while on the field is also prohibited. Maybe not, who knows nowadays.