In the 1960s, a social psychologist named Melvin Lerner noticed something troubling about his colleagues. The therapists at his hospital—generally such nice, sympathetic people—seemed to be acting heartlessly towards some of their mentally ill patients, pushing and prodding them during sessions, describing the vulnerable and disturbed as shiftless manipulators. Why were these professionals, generally so kind and compassionate, treating patients as if they somehow deserved their illness?

Lerner began conducting a series of unusual experiments to find out. On the campus of the University of Kansas, he had subjects observe a woman undergo a series of tests. When the woman (ostensibly a fellow test subject but actually a grad student playing a role) got a question wrong, she was given a jolt of electricity. As the subjects looked on, the jolts became more severe. She writhed in pain. It gradually became clear: they were witnessing a woman being brutally tortured.

The subjects were understandably distressed. When given the option of changing the experiment, the vast majority chose to end the electric shocks. When they weren’t given that option, however, Lerner witnessed a disturbing reaction. As the participants continued to watch, unable to alter the victim’s fate, they began to derogate the woman. Different groups were told she was being paid different amounts of money for the experiment. The lower the pay, the more the subjects disliked her. Irrationally, with no evidence to support it, the observers became convinced the woman deserved her punishment.

The results, Lerner argued, were the result of what he called “belief in a just world”—the natural tendency to see the universe as an essentially fair place. When presented with an obvious injustice, we try to resolve it: we end the cruel experiment, cure the patient, free the innocent man from jail. When we are helpless to change things, however, rather than give up our belief in the essential rightness of the universe, we begin to rationalize away the unfairness. The sight of a woman suffering without any hope of compensation was simply incompatible with a just world; in order to reconcile those two facts, observers irrationally decided she must have done something to justify her punishment.

The experiments, which Lerner expanded over the next few decades, were investigations into that fundamental human impulse enshrined in ancient religions, new-age platitudes, and countless clichés: a belief that people get what they deserve, that what goes around comes around, that chickens inevitably come home to roost.

This is, of course, a demonstrable lie—life is unfair; chickens wander all over the place—and yet it remains a remarkably powerful belief. Since Lerner’s experiments, “belief in a just world” (or BJW) has been a tested against a variety of attitudes and actions. People who strongly believe in a just world have been shown to be prone to blame sexual assault victims, more willing to malign people suffering from minor illnesses, less compassionate towards victims of spousal abuse. A 1975 study [pdf] found BJW correlated with a tilt towards authoritarianism, an admiration for political leaders, and contempt for the underprivileged.

In a recent study, published in Policy Studies Journal, researchers found that people who believe in a just world were less likely to support affirmative action programs, even after controlling for race, sex, education, and income. If you believe that success comes from hard work and that people get what they deserve, you’re unlikely to support preferential hiring programs for women or minorities.

What’s fascinating about belief in a just world is just how natural it can seem, how necessary. As Lerner wrote: “The belief that the world is just enables the individual to confront his physical and social environment as though they were stable and orderly. Without such a belief it would be difficult for the individual to commit himself to the pursuit of long-range goals or even to the socially regulated behavior of day-to-day life.”

People believe in a just world because it is too much to dwell on the capriciousness of the universe. A belief in a fundamentally fair world—a place where you’re unlikely to be killed unless you’re a gang member, unlikely to go bankrupt unless you’re a fool, unlikely to be raped unless you’re “asking for it”—is a comfort. It’s a way of maintaining the vital illusion that we, the healthy and prosperous, are not just lucky, but somehow deserving. Everyone wants to live in a just world. If we hope to ever get there, step one will be overcoming the magical thinking that insists such a world already exists.