The words of my two atheist friends will be in blue and green.
Why does Jesus say that we will get whatever we ask in prayer, as we obviously don’t?
Because prayer is conditional upon being consistent with God’s will. So if we pray (to use an extreme example) for a difficult neighbor to be struck down and not able to talk or walk, that wouldn’t be in God’s will and God wouldn’t answer it.
1 John 5:14 (RSV) And this is the confidence which we have in him, that if we ask anything according to his will he hears us.
James 4:3 You ask and do not receive, because you ask wrongly, to spend it on your passions.
Even something not immediately immoral or amoral wouldn’t necessarily be in God’s will, because He knows everything and can see where things might lead; thus may refuse some requests. When Jesus says “ask and you shall receive,” etc., it’s in a familiar Hebrew proverbial sense, which means that it is “generally true, but admits of exceptions.”
I can’t help but feel like the response to prayer winds up a bit circular. Prayers will be answered if they are consistent with God’s will. But if they are consistent with God’s will, why was the prayer needed in the first place? Does God have an endless list of things that he could do if only someone asked him, but which he won’t do if nobody does? That seems at first glance to be a very odd system, and from the perspective of sentient beings who may suffer illness or injury simply because someone didn’t explicitly pray on their behalf, seems morally dubious.
God doesn’t need anything. He’s not sitting up in heaven waiting for us to summon Him so He can act (as if He is our mere robot). He urges us to pray in order to involve us in His actions. That’s how He likes it to be. Prayer helps us (i.e., it’s a good and pious thing to pray), and helps recipients of prayer. The world was designed to be a place where people helped each other. Prayer is a means of helping others by involving the power of God.
It doesn’t logically follow, however, that because no one prayed for a specific need, that therefore God won’t fill it. Such a thing is never stated in the Bible, and is simply your unwarranted conclusion. Nor is it taught in Christian theology anywhere that I am aware of.