Reacting to another
I don't remember where I first heard this. It may have been spoken in a conversation about road rage. I think there's something very true about it, though, and it speaks to much more than driving.
When someone is unkind to you, they're probably not reacting to you. They're probably reacting to the last person who upset them.
In other words, when one is unkind or behaves strangely toward you, especially when there is no obvious explanation for their behavior, their annoyance may be misdirected. They may be treating you the way they wish they had treated someone else, someone who came before you. It's not fair, but that's life.
Apparently, psychologists call it displacement.