Video gamers know how the ritual aspect of behavior reinforcement works.
The brain has a reward center whenever a successful behavior occurs. This "win" can be actual or even virtual--it doesn't matter.
Gamers experience high after high as they earn their way through levels of challenges.
At some point the behavior becomes ritualized into a mirror of addiction.
The gamer may be exhausted, hungry, and even joyless--but--seemingly unable to stop playing the game.
Why? The reward center holds the drugs for the behavior. It is like the lab rat dosing itself to death for a high. It isn't rational, certainly--but, it makes a kind of brain-sense behaviorally. Scary stuff.
When somebody engages in ritual superstitions it seems like innocent nonsense most of the time.
"I will keep my fingers crossed" is the kind of of statement of ritual behavior which contains belief in hope+ritual which appears to attach itself to outcome.
"I will pray for you" is no different. It's a reflex superstitious behavior empty of actual content which carries the hope of outcome based certainty.
A prayer only has to seemingly work once for the behavior to align with ritual repetition.
Carried to obsessive extremes, a prayer wheel (in some countries) is turned 24 hours a day to send requests without end into the void in compulsive superstitious addiction. The rosary is another compulsive addiction. Ritual behavior with implied reward/outcome connections.
I've started telling people (when they say they will pray for me) I'd rather have them dance the Hokey Pokey for me instead. It is no more or less effective than prayer--but--it carries entertainment value, at least.
Religion may well be ritual which may well be a kind of natural drug addiction created by our very own brain!