You know the door-close button in the elevator? Prayer is like that.

Pressing the elevator button that says “Door Close” should close the doors. Unless there’s something in the way, the doors should immediately begin to close, but that rarely happens. Why do you still press it?

The door-close button is a placebo button. We like to feel in control, and this button supports that illusion. The illusion works because the door closes eventually.

Prayer works like this. Sometimes you pray and get what you wanted. Most of the time, though, your prayer isn’t answered. Christians are good at finding rationalizations—it was your fault for asking for something selfish or foolish, God has a better plan, God isn’t your genie, God did answer it (just not the way you wanted), and so on.

Why have a button that doesn’t work?

A few door-close buttons do work, though most don’t. In the US, the 1990 Americans with Disabilities Act required that elevators stay open long enough for someone with a disability to get on. In response, some door-close buttons were given a delay, and some were disabled. The button can still reliably close the doors, but that capability is only accessible by maintenance or emergency workers.

This isn’t the only placebo button in daily life. New York City has thousands of crosswalk buttons with instructions that tell you to push and wait for the crosswalk indicator, but most of these buttons are disabled. The crosswalks are now controlled by software, not you, and to remove the misleading buttons would be expensive. This is true in many cities.

Some workplace thermostats are decoys. You can change the setting on these devices, but that won’t change the temperature. Why have them inactive? Because employees fighting to change the temperature wastes energy. Why have them at all? Because employees are happier with an illusion of control.

Humans in a Skinner box

B. F. Skinner’s famous pigeon experiment illustrates how placebos like fake buttons and prayer work. Skinner placed pigeons in individual boxes where food pellets dispensed randomly. Whatever the pigeon was doing when a pellet appeared—preening, stretching, walking, or whatever—was eventually interpreted to have caused the pellet. When they were hungry, they would perform the incantation that seemed to have brought about the food in the past, over and over. More performances of the action led to more apparent instances where the action caused the food, which reinforced the behavior. Eventually, each pigeon would repeat one action, and each had their own actions. Oddly, not only were the pigeons’ initial actions not causative, they weren’t even correlated with the food (except randomly).

Other feeding schedules in the experiment—one pellet at regular intervals, for example—didn’t produce as strong an effect. It was partial reinforcement that worked best.

In humans, we’d call this a superstition. Or a religion.

Prayer “works” in a similar way. It doesn’t work like a light switch works—that is, reliably. It works intermittently, in a way that’s indistinguishable from chance. If it were reliable, there would be scientific studies confirming this.

If the door-close button didn’t work, how would you know for sure? The doors do close eventually.

If sacrificing an enemy to the Mayan god Chaac or sacrificing a child to the Aztec god Tlaloc didn’t bring rain, how would you know for sure that the ritual didn’t work? The rain does comes eventually. Maybe the god is just angry at us, and that explains the delay.

And if prayer doesn’t work, how would you know there’s no god listening? How do you know that prayer isn’t just a placebo button? That little pellet of reinforcement from heaven drops down eventually. Christians can find a dozen rationalizations to support their god belief.

See also: The most powerful argument against Christianity

Give a man a fish,
and you’ll feed him for a day;
give him a religion,
and he’ll starve to death while praying for a fish.
— Anonymous