A woman I knew in high school in the 1970s, and who was ordained as a Methodist minister a few years ago, posted some photos on Facebook of a trip she took to Israel a few years ago. Along with the photos, she commented "The prayer that never fails, 'Thy will be done.'"
I would call that "the ultimate salve for cognitive dissonance". In "the Lord's prayer" Jesus reputedly said "thy kingdom come, thy will be done on Earth, as it is in Heaven."
James 4:13-16 says " 13 Come now, you who say, “Today or tomorrow we will go into such and such a town and spend a year there and trade and make a profit”— 14 yet you do not know what tomorrow will bring. What is your life? For you are a mist that appears for a little time and then vanishes. 15 Instead you ought to say, “If the Lord wills, we will live and do this or that.” 16 As it is, you boast in your arrogance. All such boasting is evil. "
In Mark 11 Jesus is said to have claimed that if a person has faith, they can tell a mountain to move and God will make it happen. In James, it is said that if you're sick and you call the elders to pray for you, you'll get well. These promises don't have caveats (except for a lack of faith in the first one). Ask for it, and as long as you have faith it will happen -- period!
But when people add "if it's your will" (or, more likely the antiquated English phrase "if it be thy will"), they provide an "out." This "out" isn't for their god, but for themselves. If they add "if it be thy will" then when it doesn't happen, they don't have to wonder why their god didn't keep his promise. They can just say "I suppose it must not have been God's will." Between that and "God's ways are higher than man's ways" they give themselves a way to ignore the fact that the relationship between saying prayers and things actually happening is completely random. There's no positive correlation unless people are praying for things that are likely. There's no negative correlation unless they're praying for things that are unlikely. Saying "thy will be done" allows them to count the "hits" and ignore the "misses."
The terms "Postdiction" and "Hindsight Bias" usually refer to the way psychics go back after the fact and "prove" their abilities by telling you about the things they got right, but it applies to prayer even better, because with prayer, the believer has been taught ahead of time that if what they are praying for doesn't happen, it's not because there's nobody listening -- it's because it just wasn't what their god thought best. You've no doubt heard the expression that some unfortunate person "can't win for losing." Well, people's gods can't lose for winning!
Recent studies have shown that when people are shown statistics, they will often dig in their heels regarding their false beliefs. That being the case, how would you go about showing a Christian or other religious person that "thy will be done" is an evolutionary adaptation of their religion to keep itself replicating throughout the ages?
It seems so obvious from the outside.