Fact:
In the real world humans are the only sentient species and all humans are just humans, there are not several distinct races of humans.
The only context in which the term race makes sense in the real world is when we talk about domesticated animals, and those races were created by humans. Even many animals (like dogs) do not belong to one race but they are a mix of all kinds of origins.
This does not stop some idiot humans from being racists.
My opinion :
DnD is a fantasy setting with many different races. I guess there are as many differences within one race as there are differences between real world humans and it looks like almost all sentient races can mix, so the population in most areas (except some remote villages and some fanatic cults) is a wild mix of all kinds of races. Under these conditions racism makes less sense than in the real world.
I would expect that only isolated communities and members of some evil groups who are described as racist (like Gith following queen Vlakith or drow worshipping Lolth) show strong racism. I assume racism is evil but not all evil groups are racist, some care only about power or they try to create chaos, tyranny, pain, suffering, destruction and so on.
Finally, this game is about an epic journey to save (or maybe destroy or conquer) the world, not about analyzing the social structure of a fictional society. Racism can be a part of the game, but it's not the main focus.
It's more understandable if you think about historical races of men. Let me quote from a campaign setting I'm working on:
In the real world we live in, we often speak of different races of men in terms of ethnic groups that have very minor differences overall that might amount to nothing more than character appearance descriptions and maybe +1 survival modifiers based on climate absent of technology. Actual races of men have existed with all of Homo Sapiens being one of those races; Neanderthals, Denisovans, Homo Rhodesiensis, and Homo Heidelbergensis are examples of different races of men that could have as meaningful differences between them that might translate as halflings, humans, elves, and dwarves. In order to create such differences in our world, we had to have a mechanic to prevent interactions between these different races so that they could become different strains of men over time. It isn’t until 574 EI that the first magically mixed races appear. At the same time, these races can then develop in such a way that we can see ethnic differences that mimic those we see in humans so that these different races are accessible to players in different ethnic groups who want their character to look somewhat like themselves.