From a 2020 interview:
Jennifer Grossman [51:40]: While no rational person would support racism, would you accept the idea that a person has the right to be racist? I mean, do people have the right to believe horrible ideas?
Stephen Hicks: I would say you don’t have the cognitive right. You don’t have the moral right to hold obviously primitive and repulsive ideas like racist ideas. But I think you do have the legal right to do so. Yes, just like you have the right to believe lots of repugnant things like all sorts of religions that believe women should be second-class citizens, or all sorts of economic systems like socialism that don’t respect entrepreneurs and people who create enormous amounts of wealth. All of those are atavistic, primitive beliefs—but people have a legal right to do so.
Now, I think, in the case of racism, since it is such an easily confrontable belief, I really don’t understand why people are afraid of it. In my experience, I can count on one hand the number of racist things I’ve heard in my life. You might argue that I live in a bubble. But the racists are pretty much underground, and they don’t really have good arguments. The best way to deal with repugnant false ideas is let them be out there so that we are aware of them and we can counter them. And we can continue in the process of ongoing cultural education by having better arguments and better facts to point out against the ideas that we think are false.
The full interview is here:
Related: in the Philosophers Explained series.