People constantly pray for others: for their healing, for temporal blessings, for spiritual blessings. But we are also told that these blessings will only be given if it’s the Lord’s will. If the Lord is just going to do whatever He already wants to do, and we can’t know what He has planned, why do we bother praying for anything? Does He even care what we ask for, since He’s already decided what to do?
You are quite right that the Lord’s will will come to past no matter what we might ask for or do. When we understand this it is a natural progression to ask “Why does it matter what we do then?” The answer to that question is to gain a better understanding of what the Lord’s will is.
To begin to understand the Lord’s will lets examine some scriptures. In Moses 1:39 we read:
39 For behold, this is my work and my glory—to bring to pass the immortality and eternal life of man.
This scripture teaches us quite clearly that our eternal progression is tied directly to God’s work and glory. Thus for all our imperfections, for all our flaws, God has a keen and direct interest in our development.
We understand this further when we read why the earth was created in Abraham 3:24-25:
24 And there stood one among them that was like unto God, and he said unto those who were with him: We will go down, for there is space there, and we will take of these materials, and we will make an earth whereon these may dwell;
25 And we will prove them herewith, to see if they will do all things whatsoever the Lord their God shall command them;
Here we learn that the earth was created to “prove” us, to see if we would do all things the Lord commands. It seems pretty safe to assume that this proving and testing is part of our development.
So the will of the Lord is that we develop, by seeking Him, by exercising faith in Him, by serving others (as He did and does), and by following all of the other commandments that He has given us.
Therefore knowing what the will of the Lord is we can see how directly it is fulfilled each time we pray. By praying for others we obey the commandments, we exercise faith in Him, we seek to serve and help other. All this is directly related to our development no matter what the actual answer is.
So to answer your question, the more we truly understand the Lord’s will more we understand and see that our prayers are important, even necessary, that God does care that we pray and what we pray for. We can also see that judging the importance of prayers by God’s willingness to give us what we seek, misses several important aspects of that God is doing.