Racism is bad because the powers that be say so
Same question as "Why democracy is good?"
Racism is bad, in theory, because the characteristics of the class do not map to the individual 100% of the time. Racism stops you from finding genuinely good or useful people, the kind you
do want to associate with, because of a generalized bias.
In practice, racism
against the group can save lives, increase social cohesion and trust, preserve your existing society, and improve your culture. Reconciling these two aspects of racism is nearly impossible in a liberal society, especially one that (claims to) value freedom, meritocracy, and individual rights.
Democracy is good, in theory, because it prevents tyranny. The masses are not expected to be smart, choose good policies, choose honest leaders. They are expected to vote for people who won't oppress them. Given majority rule, this means
in theory you will never get a leader who oppresses the majority.
In practice, this gets subverted a thousand different ways. Liberalism enables the
intransigent minority to oppress the majority. Progressives use guilt and modernity's ennui to get the majority to vote for self-oppressing rules. Adolf Hitler was elected, which many claim was a bad thing, but he did
not oppress the majority of his people; he was therefore a legitimate democratic ruler. Nobody wants to grapple with the many failures of democracy, because they can't figure out a better alternative; only revert to worse alternatives from humanity's past.
Glad I could help.