It's not racial discrimination per se, it's friction caused by a different approach to life. Still obviously broad brushstrokes and generalities.I'm pretty sure there's an effort to avoid portraying racial discrimination as a norm in modern media. The Hobbit movies were careful to show that the bad blood between the dwarves and the elves was because the dwarves refused to give the elves the jewels they wanted and the elves refused to help the dwarves when Smaug attacked rather than a more general racial distrust. I think the racial preferences table was pretty much a 1e feature - I don't recall seeing it from 2e onwards.
Dwarven attitude towards elves
Elves. It’s not wise to depend on the elves. No telling what an elf will do next; when the hammer meets the orc’s head, they’re as apt to start singing as to pull out a sword. They’re flighty and frivolous.
Elven attitudes towards dwarvesDwarves. Dwarves are dull, clumsy oafs ... they lack in humor, sophistication, and manners
In any case it was just a simple example of a situation where the DC may be adjusted depending on who the PC is, in this case based on race. In my campaign world some elves and dwarves get along fine, in others you wouldn't want them both at the same dinner party without first putting away the sharp cutlery.