I mean that's the fundamental attribution error isn't it? If we do it it's because of external factors, if they do it it's because they're inherently bad people.
We see this in much smaller scale everywhere. When someone you don't like does something wrong , it's surely because they're such an idiot... when it's someone you really like, it's definitely due to external causes.
Not to mention simple discrimination, which is rampant, seemingly no matter how much we try to make that go away.