Nearly everyone knows that racism and stereotyping are wrong. Unfortunately, people don't stop to analyse why, or to generalize and apply the moral principles that forbid racism to other areas in which people judge individuals by the groups into which they are classified.
The problems with racist thinking are two-fold. Racism is first a mathematical error. A blanket statement about people of the form "all X's are Y's" is erroneous if a single counter example exists. Even when a premise is put into statistical form, such as "X is on average worse (in some area) than Y," assuming that a specific member of X is worse than a specific member of Y would be a mistake. Of course, these errors are greater in a situation where not a kernel of truth exists in our stereotypes. Human cognitive biases ensure that we will be enthralled to innumerable stereotypes, often without being aware of it.
These abstract points might be academic if it were not for the second problem with racist thinking. The mathematical errors implicit in such attitudes have moral consequences. We treat people differently from how we should because of our errors in reasoning. The consequences can range from accidentally giving offense to persecution, oppression, and genocide.
Decades of education have endowed most people with a finely-honed instinct for recognizing overt racism. Unfortunately, this instinct seems to be useless in noticing stereotypes not associated with historically persecuted classes, i. e., those stereotypes we decry as racist or sexist. As a simplistic example, it is common for people with progressive ideas about race to make statements which depict southerners as racist and backwards. When challenged on such points, perpetuators of stereotypes typically respond exactly as a racist does: "but it's true." They dismiss counter-examples in the same way, by adducing reasons the counter-example is nonrepresentative.
As an instructive exercise, you could substitute the name of a minority group for the group which such a person is defending his right to slander; If you were then to create a transcript of the altered conversation, you would see nothing that wouldn't be at home on the web page of a hate group.