Human nature is one of those aspects of the world that can seem inexplicable, too varied and complicated to be pinned down by overarching explanations. On the one hand our species includes people like Garrett O’Hanlon, who was standing on a Manhattan subway platform one recent night when someone passed out onto the tracks right in front of him. Without a moment’s thought, he jumped down to rescue the man. Others joined him, and together, this instant team lifted the guy out of harm’s way, right before an oncoming train came roaring into the station. Afterward, O’Hanlon was surprised by the attention he got. Risking his life to save a stranger was no big deal, he says: “To me, that’s just what people do.”
On the other hand, human beings also get involved in a different form of instant community: The bile-spewing haters who unite online to obsess over high-profile criminal cases. Scott Peterson, convicted in 2005 for killing his pregnant wife, had a vindictive following, as did Casey Anthony, the Florida mother acquitted of murder in 2011 in the death of her baby daughter. In a recent piece on Slate (and a related Kindle single titled “Trial by Fury”), the writer Douglas Preston describes the fanatical digital mob focused on the American college student Amanda Knox, convicted of murder in a lurid trial in Italy:
The extreme viciousness of the anti-Amanda commentariage is startling. There are countless statements calling for the murdering, raping, torturing, throat-cutting, frying, hanging, electrocution, burning, and rotting in hell of Amanda, along with her sisters, family, friends, and supporters… The anti-Amanda universe coalesced around three websites devoted to seeing her punished. The administrators of these sites and their followers were utterly and completely obsessed by hatred for Amanda. It had literally taken over their lives.
The observation that humans can act like angels or like creeps isn’t exactly news. The surprise is that these two ways of being may have the same origin: our extraordinarily cooperative nature. A cluster of anthropologists, economists, and psychologists proposes that the same psychology that permits us to engage in heroic acts of self-sacrifice and form enormous cooperative societies also gives rise to the desire to punish, retaliate, and destroy what we find immoral. If we did not have this impulse to make people pay for what they’ve done wrong, these social scientists believe, our societies (and our urge to help others) would quickly disintegrate.
If millions of chimps were on the Internet, they might look at porn or pictures of cats, but they’d never bond together in mutual hatred of a stranger.
The key is “altruistic punishment”—the urge to retaliate against people who break social rules. Mathematical models suggest that our willingness to punish rule-breakers is the glue that maintains our cooperative societies. Without this tendency, our societies would be overrun with cheaters and freeloaders, who take advantage of benevolent people like the subway rescuers without ever reciprocating. But if some group members are willing to punish those who break the rules, cooperative order can be maintained. Altruistic punishment seems to be ubiquitous: A study of 15 small-scale societies across the globe led by the University of British Columbia anthropologist Joseph Henrich found that people from every culture punish cheaters.
It also seems to be something that only human societies do, says Michael Tomasello, the co-director of the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany. Tomasello’s research, which I wrote about for the debut issue of Nautilus, seeks to explain the deep similarities and striking differences in human and ape cognition. In his thinking, altruistic punishment shares roots with other uniquely human behaviors, such as our ability to collaborate and our capacity to create and teach culture. Chimps, smart and sociable as they are, do none of these things. A chimp who sees another chimp cheating a third individual couldn’t care less, explains Tomasello in his recent book Why We Cooperate:
If one chimpanzee steals food from another, the victim will retaliate by preventing the thief from keeping and eating the food. But so far… we have not witnessed any comparable behavior from observers. Individuals do not try to prevent a thief from enjoying his bounty (or to inflict any other kind of negative sanction) if he stole it from someone else. 
There will never be a chimpanzee Amanda Knox, because chimps simply aren’t interested in moral transgressions in the abstract. If millions of chimps were on the Internet, they might look at porn or pictures of cats, but they’d never bond together in mutual hatred of a stranger.
Conversely, they’d never be able to live in densely packed cities as we do, utterly dependent on the cooperative actions of millions of people we’ve never met. My conversations with Tomasello and his collaborators convince me that as cruel as we may be, what’s still a bigger surprise is our exceptional ability to get along with each other—to help and cooperate with each other, even with strangers, in ways that no other species can even approach.