Some hypotheses (I suspect actual cases of meanness are more complex than any of these):
It signals power and a lack of fear of repercussions (both to the person one is being mean to and to witnesses).
It is efficient at achieving certain results, like making people for whom the interaction is optional go away.
It can serve aesthetic or intellectual purposes, especially in the form of things like sarcasm.
It is sometimes employed as a defense mechanism to prevent unwanted closeness with others.
Some hypotheses (I suspect actual cases of meanness are more complex than any of these):
It signals power and a lack of fear of repercussions (both to the person one is being mean to and to witnesses).
It is efficient at achieving certain results, like making people for whom the interaction is optional go away.
It can serve aesthetic or intellectual purposes, especially in the form of things like sarcasm.
It is sometimes employed as a defense mechanism to prevent unwanted closeness with others.