Let's say that I'm writing a book. You ask me, "How does your book end?" I answer, "Well, I haven't come up with the ending yet, but . . ." I then proceed to describe, in detail, the last chapter of the book.
This obviously makes no sense. How can I describe the ending when I haven't even come up with it yet, much less written it? I can't because there is no ending to describe. I'm the author, so, until I determine the ending, there isn't one. This illustrates the problem with the popular idea that God has simple or bare foreknowledge (the idea that God knows future events ahead of time but in no way predetermines those events).
The Logos Bible Sense Lexicon offers this definition of foreknow, "to befriend or be acquainted with someone in a familiar way ahead of time or before meeting; implying an exclusivity of choice relative to those not befriended." God's foreknowledge, then, is an active foreknowledge. God foreknows what he foreordains. To say that God foreknows his people is to say that he chooses them beforehand.
This is the only possible explanation because, as the self-existent, all-powerful, all-knowing Creator of the universe, God is the author of history. He knows the ending from the beginning because he wrote the ending. He can only foreknow what he foreordains because there is simply nothing for him to know apart from his foreordination.
Until God determines the future, there is no future for him to know.