Does prayer change God's mind? If not, why do we pray?
To help with the first question, consider the following passages:
He issued a proclamation and said, "In Nineveh, by the decree of the king and his nobles--Let neither human nor animal, cattle nor sheep, taste anything; let them not eat and let them not drink water. 8 Let every person and animal put on sackcloth and let them cry earnestly to God, and let every one turn (Hebrew shuv) from their evil (Hebrew raah) way of living and from the violence that they do. 9 Who knows? Perhaps God might be willing to change his mind (Hebrew shuv) and relent and turn from his fierce anger so that we might not die." 10 When God saw their actions--they turned (Hebrew shuv) from their evil (Hebrew raah) way of living!--God relented concerning the judgment (Hebrew raah) he had threatened them with and he did not destroy them. (Jonah 3:7–10 NET)
God is not a man, that he should lie, nor a human being, that he should repent. Has he said, and will he not do it? Or has he spoken, and will he not establish it? (Numbers 23:19 NET)
Notice in the Jonah passage the parallel between the Ninevite's actions of "turning" from their "evil" and God "turning" from the "calamity" that He had promised. See also 2 Chronicles 33:10–13 and Luke 18:1–8.
Regardless of your answer to the first question, what about the second? Why do we pray?