God, a Being of perfect selfless love, decided sometime in the eternal past that he wanted others (man) to possess the same kind of wonderful existence and righteous character he had always experienced. Because the character he possesses cannot be given by fiat, he devised a plan whereby he would teach and train others in the ways of righteousness. His plan led to the creation of man.
The culmination of God's creativity, after bringing out of nothing everything we see around us, was to make man (Genesis 1, 2). Of all His wonderful creations we are his greatest achievement. His love for us was so great that he decided to use himself as the template for our existence (Genesis 1:26).
Although he started out small with man (Adam and Eve), He blessed them (and us) with the ability to procreate so that countless others could also be made with the potential of living forever.
Man, in the Garden of Eden, choose to reject God and instead accept guidance from his adversary the devil. This choice, however, was expected and part of the plan to ultimately save humans from Satan's way of life.
It was destined, before man was made, that we needed to taste the full effects of sin and disobedience and learn the consequences of deciding for ourselves what is right and wrong.
Why were we created to have flesh? God made man of temporary flesh and blood so that we could learn eternal lessons through a life of trials and troubles on earth.
God's plan to produce multiple billions of beings like himself, who are able to exist forever in peace and harmony, has three major parts.
The first part runs from the creation of Adam and Eve to the Second Coming of Christ. During this period only a small percentage of humans are called, converted and trained in righteousness under the direct guidance of God through his Holy Spirit.
The second part of his plan for man begins at Jesus' return. All those, who were converted and lived an obedient and faithful life prior to his coming, will be resurrected from the dead (the first resurrection). This "firstfruit" of man will rule and reign over the earth with Christ for 1,000 years, helping to teach those alive during this period to live righteously so that they, too, can receive eternal life.
The third major part of God's plan to redeem man begins at the second resurrection. All those in history who never had a full chance at salvation will be brought back to life and made to understand the truth.
All those who previously received salvation will also be there to help teach the resurrected humans in the ways of perfect love. Those who repent, overcome and are faithful will receive the gift of eternal salvation.
Why did God create man? Perhaps a better question is how could anyone who possessed unflawed selfless love and unlimited power not want to share it with countless others.
Man's potential is to become literal sons and daughters of the Eternal and a member of his spiritual Family (Genesis 1:26). His plan, in the end, will result in the overwhemling majority of all humans (99%+) choosing to live and think as righteously as he does. This is why we were created!