If God is sovereign, why do we pray?

Nothing comes to pass without our heavenly father's permission or ordination. By this almighty providence, God overrules and sways all things to his own glory. There is nothing that comes to pass but God has his purpose in it. Though the world seems to run at random in blind confusion and rude disorder, yet God governs it to make perfect harmony out of all the seeming discords.

Question: If God’s providence ordains all things that come to pass according to the immutable law of his purpose, then what necessity is there for prayer? We cannot by our most fervent prayers alter God's decrees. Our prayers cannot hasten or ripen his blessings before their time, or prevent or prolong the time fixed to bring afflictions to pass upon us. Divine providence does not only ordained what effects shall come to pass, but also by what means they shall flow. God has appointed not only the effect itself, but the means to accomplish it. Prayer is the means to bring to pass that which God has determined shall be. We do not pray out of hope to alter God’s eternal purposes, but we pray to obtain that which God has ordained to be received by our prayers. We ask, that we may be fit to receive what God has from all eternity determined to give by prayer, and not otherwise.

Therefore, when we live under any affliction, or if we are pinched by poverty, prayer is necessary because, as God by his providence has brought these things upon us, so likewise possibly the same providence has also determined not to remove them until we earnestly and fervently pray for our deliverance. Prayer does not incline God to bestow that which before he was not resolved to give, but prepares us to receive that which God will not give otherwise.”

Ezekiel Hopkins
1634-1690