This is an example of the "ego-defensive" function of prejudice.
The ego-defensive function alludes to holding attitudes that ensure our confidence or that legitimize activities that influence us to feel regretful. For instance, one way kids may protect themselves against the sentiments of mortification they have encountered in P.E. exercises is to embrace an unequivocally negative mentality to all games.