God made us for one reason: so He could have fellowship with us. It wasn't that He was lonely or needed us—but He made us in His image so He could shower His love upon us, and we could love Him in return. The Bible says, "God is love. Whoever lives in love lives in God, and God in him" (1 John 4:16).
You are right, however: God knew we were going to abuse our freedom and turn our backs on Him—and when we did, suffering and death descended on us. Adam and Eve lived in the most perfect environment imaginable, and yet they listened to Satan's lies and rebelled against their Creator. We have been paying the price for their sin ever since.
But this didn't stop God's plan for the human race! He could have simply destroyed us—but because He loves us, He provided a way for us to come back to Himself. Even before the human race sinned, God knew what He would do: He would send His only Son into the world to become the sacrifice for our sins. The Bible says, "For he chose us in him before the creation of the world ... to be adopted as his sons through Jesus Christ" (Ephesians 1:4-5).
Have you come back to God by giving yourself to Jesus Christ? Don't spend your life wandering away from Him, but discover the joy of having fellowship with Him every day. By a simple prayer of faith ask Christ to come into your life, take away your sins and make you His child forever.