I have to disagree with you here. Having a villain be discriminatory just to show “how evil they are” is lazy writing.
People aren’t evil for the sake of being evil. People’s actions are evil because their objectives and values are different from yours. Other than a few notable exceptions (eg Roger Stone), people don’t see themselves as evil or the villain. They’re either narcissistic, psychopathic, or tribalist.
If they’re narcissistic, they may be discriminatory, but their discrimination isn’t core to who they are. Who they are is a narcissist (eg Trump). The discrimination may be a tool, but it’s a tool like any other tool. In this instance, do you as an author need to use this tool to achieve the effect of demonstrating the character’s narcissism? Does the discrimination serve a purpose that can’t be fulfilled by another tool? Does the use of discrimination outweigh the potential psychic damage that could be caused to a reader who suffers from that sort of discrimination in real life? Dollars-to-donuts, you could find another tool to demonstrate the narcissist’s narcissism. (If anything, discrimination by a narcissist should be used to show how hollow and value-less the narcissist is, because he believes in nothing. Not to show that he is evil.)
As for psychopaths, psychopaths aren’t discriminatory. They would have to value their own tribe enough to devalue another tribe. Psychopaths being discriminatory is simply bad characterization.
Tribalists can be actively discriminatory—believing that their tribe is better than others—but they don’t see themselves as evil. If anything, they see themselves as good and/or righteous. Such an individual may be discriminatory towards another tribe, but that discrimination happens within a tribalist worldview that should be explored. If not, then that’s not a character, but a caricature.
More importantly, though, what purpose does the discrimination serve in the context of the story? I return to the claim that using discrimination to demonstrate that a character is evil is lazy writing. If you want a character to be compelling, then you need to understand what their motivation is and then explore that motivation. Gesturing towards the nebulous concept of “evil” by using discrimination doesn’t explore that motivation, it just makes the author look amateurish. And, to be frank, I prefer for the games that we publish to be more sophisticated than that.