I apologize for not getting back to you sooner about your question!
There are several reasons why we pray, despite the fact that we know that God has planned all things from eternity.
First, we pray because God has commanded us to pray (Luke 18:1-8). If we believe that he is king over all things, including us, it makes sense to do what he commands. That means that if he commands us to love each other, we should love each other. If he commands us to pray, we should pray.
Second, we pray because we understand that everything we have comes from him. ‘Praying’ simply means ‘asking’, and to ask God for things is an expression of our faith that he is Lord of all creation. If we didn’t think he had it in his power to give us things, or if we thought he was not inclined to give us things, then we wouldn’t ask. But we do—so we do, if you see what I mean. If you look at Acts 17:22-34, you will see that Paul criticizes the view of God that says that he needs us (vv. 24-25), and teaches instead that we need him (vv. 25, 28). Because he has what we need, we ask him—and indeed, Jesus explicitly encourages us to do just this (see Luke 11:1-13).
(The alternative to praying is not praying, which is not recommended. As James says, “You do not have, because you do not ask”—James 4:2, noting also the next verse!)
Third, we pray because he is our Heavenly Father, and the most natural thing in the world is for a child to speak to their father, telling him what they need and thanking him for what he gives. Ephesians 3:20 says that God is able “to do far more abundantly than we ask or think”, which I take as an encouragement that God stands ready to bless us beyond what we can imagine, if we will ask him to.
As for why our Heavenly Father has chosen to set up the relationship in this way so that we are meant to ask and receive (as opposed to just receiving), I don’t know. The asking is certainly not a pre-condition for blessing because, again and again, the Bible shows us that God can and does bless us without any work on our part. He makes “the sun rise on the evil and on the good, and sends rain on the just and on the unjust” (Matt 5:45). Far more importantly, “while we were still sinners, Christ died for us” (Rom 5:8). That is to say, he certainly doesn’t need us to ask for things, but he has made the world such a place that, normally, the receiving follows the asking. So we need to ask him for forgiveness for our sins and for the Holy Spirit, and when we do, he gives without limit: “And I will ask the Father, and he will give you another Helper, to be with you forever” (John 14:16).
I am not sure that the Bible gives any explanation for why the world has been set up like this. The Bible just teaches us that this is the way God has chosen to do it. My own guess (and that’s all it is) is that because God is Father, Son and Holy Spirit, eternally in relationship with himself, and because we have been made in his image and are designed for relationship, things couldn’t be any other way. For to be in God’s image is to express our dependence on God in all things by praying to him—just as God the Son completely submits himself to God the Father’s will by obeying and, most of all, by praying. God’s nature, in turn, is to respond to the prayer of faith so that Jesus receives everything he asks for, even the Holy Spirit (God himself).
I hope this helps!