Hanlon’s Razor
Rarely do people seek to do harm to others on purpose.
Instead, it might come down to them not knowing something and acting accordingly with their knowledge. The next step is they're plain stupid.
This is Hanlon's razor.
"Never attribute to malice that which is adequately explained by stupidity."
Knowing this gives you options.
If someone is acting out of malice, you can avoid them or seek to understand where their actions are coming from.
If someone doesn't know any better, you might see it as an opportunity to educate them.
And if the actions are out of stupidity, you can laugh, then work backwards through the other options.