The quick answer is "God's glory," but it has far-reaching implications. Our lives are not for our own enjoyment or our own pleasure, but for Him.
Why would God create a world He knew would rebel against Him?
We have to let some tension hang here, as we don't know all the ins and outs of the mind of God, but we know God created us knowing we would fall. He knew He would send Jesus. This question screams His love to us, which drives to His glory. The more we understand His love, the more we understand His glory. God knew the full ramifications of what was happening, and yet He chose to create nonetheless.
Creation before the fall shows us what life will be like when Jesus returns and makes everything right again. Heaven by Randy Alcorn is super helpful (AND HIGHLY RECOMMENDED) to learn more here. Prior to the fall, Adam and Eve enjoyed their work and enjoyed one another. Our relationships that we know today will be changed in eternity, but all relationships, all work, and every moment will point to God's glory.
Even right after Adam and Eve sinned, God slaughtered an animal and made Adam and Eve clothing. His plan to provide covering for their sin through the blood of Christ is already being foreshadowed here. We consistently see God's grace and humanity's need for Him throughout Scripture.
Featured Resource: Cornerstones by Brian Dembowczyk is a fantastic resource that walks through 200 questions and answers to build a strong theology with kids. Read more at www.marycwiley.com/podcast/whydidgodcreate