From Science:
If you could confront the pickpocket who ripped you off in the subway, would you simply demand your wallet back, or would you seek vengeance? Your decision to punish the thief might hinge on whether the thief ended up richer than you, a new study suggests. According to most economic theories, self-interest is the prime motivator in human behavior. However, studies show that people consistently sacrifice their own welfare to punish cheats. For example, in a classic economic experiment called the “ultimatum game,” one person holds a certain number of dollars and can offer as many as she likes to a second player. If the second player rejects the offer, the first player loses everything. Rather than accepting any offer, the second player will consistently reject low offers, preferring to receive nothing than to allow her rival to retain the larger sum. In 1999, Swiss economists Ernst Fehr and Klaus Schmidt defined this spiteful reaction toward cheats and freeloaders as “inequity aversion.” They hypothesized that such behavior is essential for cooperation and bargaining, and that it is separate from the desire for revenge, or “reciprocity,” as social scientists call it. However, says Fehr, it isn't easy to tease apart the two motivations in experiments, much less real life. “This is a long-standing question that has not been answered to our full satisfaction.”
More here.