From before the foundations of the world God purposed and planned to create man in His own image. His purpose was to reveal more of Himself, because only man is in His image (the planets or stars are not). He also wanted a relationship with those in His image, and yet He knew that man would sin and He knew that He would provide a way for man to be forgiven.
Suffering entered our world as a result of sin. So we might want to reframe the question to be, “why would God create man knowing he would sin?” The Bible does not explicitly answer this. However, I (Shari) suggest that before sin entered the world, one of God’s attributes was not evidenced. Without sin in the world, there was nothing for God to forgive and God’s forgiveness demonstrates His mercy. When Adam sinned, God forgave him and magnified His mercy throughout all creation. Thereby God was glorified and His mercy continues to be magnified every time He forgives us for our sins.
For a more complete explanation of this, click here.