One of the most common human behaviors is also one of our most perplexing: Our tendency to get all worked up about other people's business. Anyone on Twitter knows that people will jump on a hair trigger to condemn the moral failings of others.

Perhaps you'll remember when Justine Sacco, a former communications director with IAC, tweeted this: "Going to Africa. Hope I don’t get AIDS. Just kidding. I’m white!"

It was a dumb, dumb thing to say. She deserved someone calling her out for it. But thousands and thousands of people responded to her tweet. The chastising was so extreme, journalist Jon Ronson explained, that it resulted in the derailment of Sacco's life and career. Keep in mind she was a relative nobody, with just 170 followers at the start of the incident.

If the ultimate purpose of punishment is to correct bad behavior, Sacco probably could have gotten the message after the first few hundred replies. But why the mob mentality?

Humans are the only species that enjoys punishing others

"It seems like our brains are wired to enjoy punishing others," Nichola Raihani, a psychologist who studies human cooperation at University College London, tells me on a phone call.

This is an evolutionary mystery for researchers like Raihani. Punishing strangers ought to be dangerous. They can retaliate and harm us, and therefore threaten our long-term survival. Evolution, as Darwin conceived of it, favors narrow self-interest. Not these potentially costly interventions.

Third-party punishment — as the research labels this butting-in behavior — is "kind of like jumping off a cliff," Raihani says. "You don't expect that type of behavior to stay in generations very long."

And yet this this is a defining feature of humanity. Our justice system is built around juries, which are collections of third-party punishers. No other species on Earth gets joy out of punishing strangers like humans do. Not even chimps, our closest animal relatives, show moral outrage.

We're even more likely to feel outrage on behalf of other people

Typically, when psychologists give people the choice to punish wrongdoers in a lab setting, they overwhelmingly choose punishment. Neuro-imaging studies have shown that punishing others activates the brain's reward pathways, meaning, it feels good when we put others in their place.

A 2014 experiment out of New York University wanted to find under what circumstances people would choose options other than punishment after witnessing a wrongdoing. In a game that involved splitting a $10 pot between a few people, participants were given the option of punishing the selfish (took more money for themselves) or just compensating the victim.

And a very curious pattern emerged.

When the participants themselves were victims of an injustice, they were less likely to punish. But when people were making decisions on the behalf of others, they consistently chose the most punitive option available.

"It's so counterintuitive to us," Oriel FeldmanHall the lead author of that paper, told me. "Why would you be able to turn the other cheek when you are the victim, but you're not able to do that when you are deciding as a third party?"

One possible explanation is that when a crime happens to another person, it's more abstract to us. And when faced with abstraction, we fall back on mental shortcuts (in this case, it's the simple shortcut, "Crimes should be punished"). When we're the victim, our thinking can be more nuanced.

When we punish others, we're advertising our own moral character

New research finds evidence for a different hypothesis: "The basic idea is that people are punishing selfishness to convey to other people that they are trustworthy," Jillian Jordan, a psychology researcher at Yale, tells me.

This hypothesis would satisfy the question of why we've evolved to punish. When we punish a moral failing, we're broadcasting the fact that we, ourselves, are moral. It's a way to gain the trust of others, which can help us down the line.

Jordan and colleagues set up an experimental game to test this. Like FeldmanHall's experiment, it was game that involved the distribution of money among a few players.

In the first stage of the game, one player is given money to share with a second. That first player can either be fair and split the pot, or be selfish. A third player watches this interaction, and can choose to punish the first player for acting selfishly.

What Jordan found was that later on in the game, those third-party punishers would be seen as more trustworthy. Other players would reward them with money when given an opportunity.

This would suggest that there are rewards to punishing on behalf of others — a key evolutionary survival skill.

Jordan stresses that people aren't being purely selfish or disingenuous when they're expressing moral outrage on behalf of others. "They actually do feel moral outrage," she says. But this research does help clarify why this instinct came about. It's a way of demonstrating our moral character.

(That said, expressing outrage isn't the only way to appear moral. Jordan and her colleagues found that when players had other ways of demonstrating their character — through altruistic deeds — their apparent need to punish went down.)

Why is Twitter rife with public criticism?

This still doesn't fully explain why moral outrage is so prominent on the internet and in our daily lives. Our desire to punish doesn't always follow a logical course. Think about all the people who will yell at the television screen to shame athletes or coaches. Or why people pile on to punish people like Sacco to an unnecessary degree.

"If a source of our moral outrage is a desire to advertise our own goodness, then that helps us understand why oftentimes our moral outrage goes off the tracks," David Rand, the senior research on Jordan's experiment, says.

The internet has a way of taking our evolution-derived instincts and kicking them into hyperdrive. Twitter is like a Skinner box (think rats pushing a lever for a reward) for the joys of public shaming. We can keep pressing the lever without any real fear of retaliation. When the Justine Saccos of the world drop a misguided comment in Twitter, that's an easy opportunity for thousands to get some morality points.

The researchers I spoke to admit that their experimental games may not directly mirror the real world. They involve participants who don't know one another, and the stakes of their experiment are very low. But what's interesting is that these contrived lab settings actually resemble interactions on the web. ("Twitter to me is a lot more like our lab setting than the real world," Raihani says.)

Twitter's speed might also contribute to people's willingness to shame. In experiments where researchers introduce a time delay between witnessing a punishable offense and the sentencing, "the time delay diminishes the desire to punish," FeldmanHall says. That suggests if we take more time to deliberate, we'd maybe be more generous toward offenders. (Pro tip: Always wait a minute before pressing send on anything.)

There are certainly great upsides to our instinctual morality. It allows us to speak up for the weak or the mistreated. It helps us correct wrongs we see in the world. It's given rise to a mode of activism on the internet that can rally hundreds of thousands in just hours. But on the tangled web, our moral instincts can misfire.

The internet is "this forum that takes our drive to punish, and amplifies it, and leads to a huge collective overreaction in some cases, because every individual wants to express their perspective," Jordan speculates. "When you put it all together, you get a mob mentality."