There is nothing easier than demonizing a group to make yourself look good. All you need to do is generalize from the bad behavior of individuals to the entire group, while ignoring the good done by individuals in the same group. Easy peasy. You can do it to groups defined by gender, race, ethnicity, politics, religion, or anything else.
The rule, extracted, would be “I have the right to define what you are” and is usually accompanied by “But you may not have the right to define what I am.” This is dishonesty on a fascinating scale, because it is usually a technique used by intelligent people whose forebrains are shut down by fear, smart enough to construct arguments that convince themselves and like-minded tribesmen that they are superior.
That’s fine. They are asleep. I enjoy pointing this out. Those who are capable can awaken from this fear-driven nightmare. Those who cannot provide examples to those who can.
Live by no rule you would not want applied to yourself.