Many people ask, "Didn't God know Adam would sin? And why would He allow it?"
The short answer is yes, God knew! He created Adam with a free will, knowing he would rebel.
So why did God even bother? What's the point of all this? Why would God create the predicament for Adam if he loved him?
We find the answer in Ephesians 2:7 "that in the ages to come he might shew the exceeding riches of his grace in his kindness toward us through Christ Jesus". You see, free will to rebel was all a demonstration for the ages to come. Because how does the God of the universe demonstrate infinite love? By allowing man to get in a predicament that only God's death could solve! Christ put it this way in John 15:13, "Greater love hath no man than this, that a man lay down his life for his friends."
God allowed Adam to sin because God wanted all mankind to know how much God loves us. By dying for us, for our sins, taking our punishment. And nothing less than the death of God Himself availed to satisfy His Holiness and Justice. God has given us every possible reason to love him back unconditionally. Yet He still doesn't force us to love him back - that's how much God loves us!