Well, that's for the employer to decide, isn't it?
As long as they stay within the law, each employer will need to consider how best to balance free speech with the need to provide a positive and inclusive environment in which the majority of their staff are most likely to be able to do their best work.
For some, there may well be a moral aspect to it, and they will feel a duty to create a certain type of culture within the company. For others, it will be a more of a practical consideration as to how they are most likely to recruit and retain the best people for their business.
In my experience, the types of people who like to spout controversial and potentially offensive opinions in the workplace don't tend to be the best workers in any case - they typically lack self awareness, judgement and basic interpersonal skills, which are all qualities that tend to be important in a workplace setting.
So from a purely practical perspective, there simply wouldn't be any operational benefit in me pandering to the people who want to express controversial opinions because that would mean potentially losing the more talented staff who would prefer for me to do something about this kind of behaviour. It would make no business sense to just let people carry on spouting offensive shit and doing nothing to address it.
If other businesses feel that the offensive staff are actually the ones that add the most value to the team, then they may choose to implement a much more relaxed policy that is focused on doing the bare minimum within the requirements of the law. And if they lose other staff in the process because of the toxic work culture, they're presumably happy to suck that up.