Eckart Tolle addresses this in his book the Power Of Now.
He basically says that some of us are unaware of our own anger or negative emotions that we hold deep within. This attracts other angry people, so we feel victims to such hostile behavior, when in reality our own lack of presence draws it out of them.
Jealousy is also a very strong emotion and on the topic of racism, people who experience it can be extra sensitive.
I would say to try and seize the opportunity to help someone by looking inward in those situations, by asking yourself what you could be doing differently and listening with empathy and genuine intent. Most people just want to be heard.