Hindu mythology often talks about Asuras (bad people) and Devas (gods or aligned to God). The two constantly fight over world domination.
In those times, a person who wanted something from God would do severe penance (like perhaps standing on one leg or not eating or drinking as people do in the month of Ramadan) for years until God heard them. God might then appear in front of the person and grant that person whatever he wished.
An asura king would do a penance and when God appeared before him he would ask God that become the king of earth or that no one should be able to kill him etc. God would grant him that wish with an exception clause (that he might be killed only when / only by etc).
The asura having gotten this wish would now go about getting what he wanted. He would destroy peace, subjugate and kill people. The people, after a long bout of suffering, would appeal to God. God would then rectify the problem and kill the asura by using the exception clause.
Now the question that came to my mind was, who was at fault? Let's assume that the story of Asuras and Devas and God is true.
Was the asura at fault for dominating the world and making a mess? Well not really. He was morally at fault perhaps. But legally not, since he was only exercising a right - the wish that was granted by God. I am reminded of a quote from Reader's Digest that I read long time back: "Just because you have a (legal) right to do something, it doesn't mean that doing it is (morally) right." Words in bracket are mine. In this case the asura had a legal right. Perhaps not a moral right to do what he did.
Now was God at fault? Why would he grant a man a wish just because the man did a penance? Would you pay someone who cleaned your toilet if you didn't employ him to do it in the first place?
What if it was generally known that you would pay anyone who would clean your toilet and that the person didn't need to get prior approval from you?
In the same way, it was generally held that God might/would grant a wish if someone prayed hard enough. So now where is the problem?
Could we say that the problem was in the "prayer leads to granting of wish" rule? I would think so. Therein lies the problem. Because the reward (granting of wish) was in return for effort which made no sense to anyone. Who gives a damn if you prayed for 1 year or 100,000 years?
Now, did God know that the person who asked for a wish, like the one mentioned above, would misuse it? Of course he would. He was God, omniscient. And logically why would anyone want to become king of all earth if he had only honorable and peaceful intentions?
By encouraging prayer, God created a scenario where a man was granted (almost) any wish if he prayed long enough. God couldn't refuse the man the wish. The issue of asuras getting a wish, then misusing it was a direct result of the "prayer to wish" rule in existence then. If the reward is not mapped back and is not in proportion to the work done then we have a problem. "Prayer to Wish" was an example of that problem. I wonder what purpose was served by this option God gave to man.
I am reminded of an incident narrated by a friend of mine (Let me call her A). There is a custom in these parts called "Poo Midikardu" meaning (not literally) to walk on hot coal. It is a very painful thing to walk on burning coal and people do it and often pray to God for something in return.
A has a good friend B. One day A was told by B that B had done that "Poo Midikardu" for the benefit of A. Now A had never asked B to do that, A had no belief in such things. B took it upon himself to do it. When B informed A of this, A didn't know how to respond. Was she supposed to be indebted to B?
I explained to A. B did something big (as in this case). But the thing was never explicitly or indirectly asked for by A. B did it on his own. There is no debt. A didn't owe B.
Now had A told B that she wanted him to do "Poo midikkardu" on her behalf, then of course she would owe him. Had A let it be known that she wanted someone to do "Poo midikkardu" for her and if B had then done it, then also she would owe him.
(Now some people might think that in friendship there is no debt etc. But I don't agree. Can I go to a bank and claim it to be my friend and ask for a non repayable loan? Seriously, a debt is a debt. That there is a relationship between the giver and the receiver doesn't automatically cause a debt to be written off or nullified).