The problem is with your understanding of the relationship between time and God.
God knows all that is knowable of our past present and future.
How does God know our future free will choices?
We talk about God being outside of time so the God in the far distant future is the same God at the beginning of time and that God of our far distant future can see our future as just history to Him and communicate that history back to Himself at the beginning of time.
History cannot be changed since it already happened, so the history for God in the far distant future cannot change, but who created that history? Certainly God created most of that history, but God seems to have allowed humans to create some of the history (their limited free will choices to choose to accept or reject God’s Love).
There are things that are just not knowable: one of those things is “what a free will being will choose of their own free will if they are never to exist”.
So when you say: “Why did God create them?” If God is never ever going to create a being than God does not know what free will choices that being will definitely make. God would know the possible choices, but if the being really has free will, God cannot know for sure the choices made by that imaginary free will being.
As soon as a person is going to be made he becomes part of the God of the distant futures history knowledge, which is also immediately known by God at the beginning of time. So God does know everything past, present and future, since humans that will never exist are not part of the past, present or future.