Biography
Comedy, as has been noted before, ain't pretty.
John Cleese once noted, when talking about Fawlty Towers, that comedy is very much like tragedy, the only difference being that comedy lacks sympathy towards the character. This is often because the character in question usually doesn't deserve sympathy; for example, Basil Fawlty lives a life full of hardships, annoyances and general misery, but because he is anti-social and offensive towards his guests and staff, often with little provocation, and most of his misery is caused by his own actions, you find yourself laughing at him rather than mourning his misfortune. If Basil Fawlty were a decent person rather than an Unsympathetic Comedy Protagonist, Fawlty Towers would be a depressing exercise in watching a man being tortured undeservedly — a Kafka Komedy.
We sometimes laugh when we see someone else get hurt. Schadenfreude is a staple of humor, there's no question about that, but Slapstick is only acceptable in limited doses. People just don't throw around banana peels like they used to. Thus, in order for humor to be committed, writers must turn to the psychological equivalent.
This means that in any given situation, the Butt-Monkey of the moment must be surrounded by people who are capable of making him miserable, whether intentionally or not. This capacity for cruelty and its lack of consequences comprise what we call Comedic Sociopathy.
Sociopathy, loosely, is a condition in which a person is indifferent to or unaware of the rights and feelings of other people. In comedy, these symptoms show up in the darnedest places. Any time a character needs to be trodden on, put upon, tongue-lashed, stung, bashed, insulted, dejected, neglected, and all kinds of other mean nasty ugly things, somebody's got to be there to do it to them. This means that, regardless of the personalities of all the characters involved, everyone eventually develops these symptoms.
What's amazing about the way this plays out is not that there will be characters who are mean, snarky, sarcastic, and uncaring, but the behavior of the characters who are not. In order for the appropriate level of hilarious misery to occur, other characters — even kind, loving characters — must temporarily lose their ability to sense, understand, or care about the emotional discomfort, pain, and suffering that the current Butt-Monkey is experiencing. They may regain it when the plot calls for it, but for that critical moment of "gag," the character is essentially a sociopath. In the worst cases, when there's a Writer on Board, Comedic Sociopathy can cause characterization to break down completely, allowing close friends to deliver cutting remarks like casually thrown knives.
Comedic Sociopathy can be seen in almost all comedy. It is the root of shows like Seinfeld, Family Guy, and Fawlty Towers, but it shows up just as readily on Sesame Street.
See also Heroic Comedic Sociopath, a character who does this all the time and loves it. This trope is what the Sadist Show and Black Comedy live off of. This may result in No Sympathy in situations where the character is clearly deserving of it (even if it's about vengeance), unless if the intended victim is an Asshole Victim and thus having their Karma Houdini Warranty expired. Too Funny to Be Evil coupled with Rule of Funny is the basic principle that allows this trope to work. Compare to Laugh with Me! or Cringe Comedy. When this trope gets taken to extreme, over-the-top levels, it's Crosses the Line Twice. See also Disproportionate Retribution, because in comedy this is usually okay. If the example falls short on the "comedic" aspect and just comes off as cruel, it may get the reaction "Dude, Not Funny!" Conversely, if the butt of the joke is a good sport, they may agree it's Actually Pretty Funny.