Justine Sacco was passing the time by tweeting.

The trip from New York to South Africa - where she was visiting relatives during her winter holiday - is a long one, and, like most millennials, she used social media to fill the layover hours, sending pithy and somewhat caustic updates to her 170 followers. Among the tweets the young PR director decided to post?A particularly terrible joke about AIDS.

What happened next is a story many of you know. She landed in Cape Town, turned on her phone, and discovered that her small, public twitter feed had been picked up by Gawker. She was the top trend on Twitter, and - in that moment - one of the most hated people on social media.

Condemnation of wrongdoers, from cheaters to insensitive politicians (sometimes both), has been around for a long time. (Remember the Puritans?) But why do we get so riled up, even if the wrongdoing doesn’t affect us?

Jillian Jordan, a Ph.D. candidate in Yale University’s psychology department, thinks she might have the answer: “When you express your moral outrage and punish people who have mistreated others, you’re able to broadcast to other people that you yourself are morally good.”

By condemning bad actions, you broadcast your own morals, advertising yourself as trustworthy and “good.” As Jordan explains, “people want to interact with you.”

Jordan also points out that if the point of moral condemnation is to make you seem trustworthy, you should refrain from that behavior around people who already know you. Tattle-tales, she cautions, are pretty much universally disliked.

But the real kicker? Hypocrites.

“It makes you a liar to be a hypocrite,” Jordan says. If you’re condemning others, then “you’re broadcasting to everyone around you, ‘I don’t cheat on my wife.’ So if you do cheat on your wife, you’ve mislead people and gained some false reputational benefits as a result. And people think that’s really bad.”

Sometimes moral outrage can be scary. Very scary.

But Jordan thinks it can also be a positive force. “Politicians now are held very accountable for every comment they make… I think this can encourage them to be accurate and sensitive about issues they wouldn’t have had the incentive for.”

She may be right. In the age of what Jordan calls “internet outrage,” pretty much everyone is more accountable for what they say. And you can quote us on that.