Why Did God Create Man?
In creating the solar system, God demonstrated His omnipotence (unlimited power). In fashioning the angels, His Omniscience (infinite knowledge) was seen. In judging Lucifer, His holiness was demonstrated. But one attribute of God had not been exercised -- His grace.
Revelation 4:11 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.
God created man for His pleasure.
Ephesians :6,7 And hath raised us up together and made us sit together in heavenly places in Christ Jesus: That in the ages to come he might shew the exceeding riches of his grace in his kindness toward us through Christ Jesus.
It's not unreasonable to suggest that God created Adam, knowing full well that he would sin (but in no way encouraging him to do so); and then, in the fullness of time, God planned to send His only Son to die in man's place and thus display His marvelous grace.
Amazing grace, how sweet the sound.