In the realm of psychology, there are four primary reasons why a social creature such as a human exhibits unsociable, or mean, behavior: positive distinction, downward comparisons, classical projection and ego threat. When someone criticizes or threatens another, it's almost always due to an internal insecurity, according to Psychology Today.
Positive distinction argues that humans have an innate need to feel unique from one another, according to social identity theory. An individual human has the need for his group, the in-group, to feel superior and unique when compared to other groups, or out-groups. When there is competition between two groups, this rivalry extends into mean behavior, according to Psychology Today.
Downward comparisons is a way for a human to feel better about himself by lowering the social value of others through mean or critical behavior. Social comparison theory states that those with low self-esteem feel better after attacking another person. This is similar to ego threat; when a person is feeling lower self-esteem than usual, he is prone to attacking the self-esteem of others as a way to improve his confidence.
The final primary reason for mean behavior is classic projection. This is the idea that someone who is feeling a negative emotion or thought, such as dishonesty or jealousy, projects this emotion onto those to whom he is closest, creating a cycle of negativity.