You are correct that God knew "the world was going to be like this". With that knowledge He could have created man as a robot programmed not to sin, but instead He gave Adam a conscience (a moral sense), told him the rules and gave him the chance to prove himself. "Of the tree of the knowledge of good and evil, thou shalt not eat of it; for in the day that thou eatest thereof, dying, thou shalt die." Genesis 2:17 KJV, margin
Adam sinned–willfully. "Adam was not deceived." I Timothy 2:14 Moffatt
He was ousted from the Garden of Eden and eventually died, taking the rest of mankind with him.
Fortunately for us, God had already arranged to send His only begotten son to earth to live and to die on the cross as a perfect human being, a ransom price for Adam and his entire race. "Therefore, just as sin entered the world through one man, and death through sin, and in this way death came to all men, because all sinned…..Consequently, just as the result of one trespass was condemnation for all men, so also the result of one act of righteousness was justification that brings life for all men." Romans 5:12, 18 NIV Beyond a guaranteed resurrection, mankind has been promised that, "God shall wipe away every tear from their eyes and death shall be no more, neither shall there be any anguish–sorrow and mourning–nor grief nor pain any more; for the old conditions and the former order of things have passed away." Revelation 21:4 Amplified
So, why did God allow the world to "be like this"? Because good would never be appreciated except by the contrast with evil. "Thou art worthy, O Lord, to receive glory and honor and power, for thou hast created all things, and for thy pleasure they are and were created." Revelation 4:11 KJV God knew His family would never learn the lesson of the results of disobedience except through hard experience and by trying in vain to run their lives by their own rules. He wanted us to reach a thorough appreciation of His laws through the comparison of good and evil, and thereby come to worship Him in spirit and truth (John 4:23, 24) and to love Him as He loves us.
"For us there is but one God, the Father, from whom all things came and for whom we live; and there is but one Lord, Jesus Christ, through whom all things came and through whom we live." I Corinthians 8:6 NIV