From a Catholic perspective, I would say that God created man because His essence is love. He is generative being (something that is imaged in man and woman through procreation.)
I think Christ answers this question quite well in Luke chapter 7 when he visits a Pharisee’s house. A sinful woman bathes his feet in oil and her tears. The Pharisee thinks to himself that if Jesus were a prophet He would know what kind of woman she was. Jesus answers with a parable about two men who owe a creditor money. One owed 500 days wages and the other 50 days wages. When the creditor forgave the debts, Jesus asks, who would love the creditor more? Obviously the one who owed 500 days wages.
The same is true for all of humanity. As sinners we all owe God. Our sin makes for a better love in the end, a stronger love. Hence, God created us even though we sinned. There is something better on the other end of our suffering, the eternal love of God and not the self. Our suffering makes for a better love, but our suffering is not the result of God’s will, but of our own free choice to sin. Sin means suffering; God willed beings that would freely accept His love and love Him. Those creatures turned away to self worship, but in and because of His encompassing love, He did not destroy man. Instead, He has greater things in store for those who endure to the end (with Him.) The short answer is love.