Drawn into the stream
Of undefined illusion
Those diamond dreams
They can't disguise the truth
Social identity theory suggests that we will critique the actions of people differently depending on whether they are affiliated to groups we belong to. We will be less critical of individuals who belong to the same groups that we do.
When they do something wrong, we will be prone to look the other way and give those people free passes. At the very least, we will try to rationalize away their behavior and dismiss it as 'fringe,' and not representative of our group.
People who are affiliated with groups other than ours will be much more subject to our criticism. Their behavior will be subject to microscopic analysis. We will be prone to generalize individual behavior as representative of group.
We will perform the mental gymnastics necessary to rationalize our group as superior to their group in order to elevate our personal self-image as high as possible.