Sometimes it happens that a person supplicates for something, but his supplication is the result of his ignorance and stupidity. He desires something from God Almighty which under no circumstances can be useful or beneficial for him. In such a case, God Almighty does not reject his prayer, but fulfils it in some other form. For instance, a cultivator who needs a bullock for his plough goes to a ruler and asks him for a camel. The ruler knows that a bullock would be useful for him and he directs that he should be given a bullock. If that person should say that his request has not been granted, it would be foolish on his part, for if he were to reflect, that which happened was the best for him. In the same way, if a child beholding red burning brands should ask its mother for them, would a kind and compassionate mother hand them over to it? Thus, sometimes, circumstances arise in connection with the acceptance of prayer that people who are impatient and lack goodwill become the cause of the rejection of their prayer.
Hazrat Mirza Ghulam Ahmad (as), The Essence of Islam – Volume II (Tilford, Surrey: Islam International Publications Ltd., 2004), 221-222.