You’re confusing God's foreknowledge with God's predestination.
(Isaiah 14:27). Just because God knows what is going to happen doesn't
mean He causes it. God knows the things that would have happened if the
things that did happen didn't! God is omniscient, all-knowing.
(Read Ezekiel 28:12-14). God created Satan "perfect" (v. 15) until
"iniquity was found in thee". God did not create Satan with flaws;
He gave him a free will. Ezekiel 28:17 tells us how Satan exercised his
free will. "Thine heart was lifted up because of thy beauty.."
This is pride. We see more of Satan's rebellious choices in Isaiah
14:12:17. He "said in thine heart ... I will be like the most high."
Satan wanted God's very throne. He corrupted a third of the angels (now
known as demons) to follow him. (Revelation 12:9 and 7:12). Satan has
been judged (Genesis 3:15) and will be destroyed. The Lake of
Fire was prepared for the Devil and his angels. (Matthew 25:41;
Revelation 20: 10).
When did this happen? In the dateless past, after the original
creation. (Genesisl:1-2a). ln the re-creation of the world in six days,
as we know it now, Satan was already the evil character we know from
Scripture. (Genesis 1:2b through Genesis 2:3; John 8:44).
God created man in innocence (untested righteousness) (Genesis 1:31),
with a free will, the ability to choose God's will or his own.
(Genesis2:16,17). Of course, we know the "rest of the story" as it is
given in Genesis3:1-19. The Devil tempted Eve, she took the forbidden
fruit "of the tree of the knowledge of good and evil", gave it to Adam.
Physical and spiritual death entered the human race the moment Adam
partook. They began to die physically through natural processes,
though Adam lived to a ripe old age of 930 years (Genesis 5:5). God
drove them out of Eden as, if they had eaten of the tree of life, they
would have lived forever in this sinful state.
Adam and Eve died spiritually, as well (Romans 5:12). Their
sinful nature separated them from God and this they have passed on to
the whole human race. "For all have sinned" in that we are
descended from Adam and Eve. (Romans 3:23). Did God have a remedy for
this great tragedy, the seeming ruination of his beautiful creation?
Yes! Christ knew before the foundation of the world what His mission was
to be. (I Peter l:18-20). He was to be the perfect sacrifice, the Savior
of the world. (John 1:29).
Why? God wanted us to know His grace. (Romans 8:28-32). "He that
spared not his own Son, but delivered him up for us all, how shall he
not with him also freely give us all things." (Verse 32) All things!
Everlasting life! God, the Holy Spirit, living within us to help at all
times! If He had made us just "robots", we would have missed all this.
We could never experience the greatness of Almighty God.
Yes, God knew you before you were ever born (Psalm 103:8-14; Psalm
139:16). He knows all about you and He wants you to love and accept Him
out of your own free will. "But as many as received him, to them gave
he power to become the sons of God, even to them that believe on his
name, Which were bom, not of blood, nor of the will of the flesh,
nor of the will of man, but of God. " (John l.:12,13).