One of the functions of prayer is to acknowledge Divine Providence in our daily affairs. By putting forth supplications about our mundane wishes, we acknowledge Divine involvement in those affairs, and thus merit a positive response. It is not that by asking we so to speak change the mind of God, but that by acknowledging the hand of God we merit his response.
Rabbi Yeḥezkel Levenstein illustrates this concept with a story that occurs in the Talmud. In the story, Elijah the prophet reveals to Rabbi Judah the Prince that if he were to appoint Rabbi Hiyya and his two sons to lead the congregation in prayer; the messiah would be forced to come due to their lofty stature, even though it was not the set time. As one would suppose, R. Judah went ahead and appointed them to lead the prayers. As soon as they reached “You are the resurrector of the dead”, the ground began to shake as though the dead were about to rise from their graves. When they said “You cause the wind to blow and the rain to fall”, the wind blew and the rain fell. This caused a great commotion in heaven. Who had revealed this secret that was allowing these people to force the end? The Talmud relates that when it was determined that Elijah the prophet was the one, he was ordered to do what he could to stop the prayer service immediately. So Elijah returned to the world and caused an elaborate distraction to the prayers, and the rest is obvious – as the messiah did not arrive.
One problem commonly raised with this story is that “You are the resurrector” and “You cause rain to fall” are clearly not supplications, they are merely praises. What does it mean that their praises were answered? The answer is, says Reb Ḥatzkel, that if the objective of prayer is to express our belief that the world is run by God, then what better way to achieve this than praise! If we ask in order to show that we believe it possible for us to be answered; certainly by directly praising God we can merit a response.