Gods Foreknowledge
It’s not pre-determined (unless you know in certainty something we don’t). Definition of creation is that it can do both good and evil (this in the revelations that God gave us). Any further claims out of our understanding, are at best speculations and at worst false assumptions. True knowledge that comes from God in His Book confirms us that free will is not an illusion, since we can’t figure this knowledge out of own, it is best to accept what the Creator Himself is telling us.