Why pray if God already knows what we will ask for? I've given an answer to this HERE.
J. P. Moreland presents what, to me, looks like the argument I gave. (In his book A Simple Guide to Experience Miracles.)
Consider these two statements.
A: It must be the case that if God foreknows that X will happen, then X will happen.
B: If God foreknows that X will happen, then X must happen.
While the two statements seem to be saying the same thing, they are not. Statement A is true. Statement B is false. Statement A does not imply that God determines the future.
So, this statement is false: If God already knows what will happen in the future, then it has to happen, whether or not we pray for it.
For more, see Moreland's book, pp. 51 ff.