Just because God knows all that will happen before it happens does not mean that He therefore causes it to happen. He knew all of the sin that would occur on this planet, but He surely did not cause it! That He has allowed it we don’t deny, but there is a big difference between causing and allowing. He likewise knows who will accept and who will reject His offer of grace, but He does not cause some to believe and others to reject—He allows men to reject if that is their decision.
"Declaring the end from the beginning, and from ancient times the things that are not yet done, saying, My counsel shall stand, and I will do all my pleasure."