Because He is omnipotent, God certainly knew before He created humans that every person would have a sinful nature and that many – perhaps, most – of us would not even acknowledge Him as our Creator.  So, what reason(s) did God have for creating humans?

The Christianitytoday.com website emphasizes that God created mankind because of His love for us, even before He created us to fulfill His eternal plan.  According to this website,

First, [God’s creation of humans] wasn’t because he needed us: “The God who made the world and everything in it … is not served by human hands, as if he needed anything” (Acts 17:24-25).

And he didn’t make us because he was lonely. Long before we were here, God already had “company” with his Son and the Holy Spirit, referred to in Genesis 1:26, “Let us make man in our own image.”

And he didn’t make us because he needed his ego fed. It’s not like God made us to satisfy some craving to be worshiped. God is totally secure in who he is—without us.

Second, despite not needing us, God chose to create us anyway, out of his great love: “I have loved you with an everlasting love” (Jeremiah 31:3). Yes, God loved us before he even created us. It’s impossible to get our heads around that idea, but it’s true; that’s what “everlasting” love means.

God is love (1 John 4:8), and because of that love and his wonderful creativity, he made us so we can enjoy all that he is and all that he’s done.

Third, God created us to fulfill his eternal plan.

[For an in-depth discussion of God’s love, click on “Is God’s Love Conditional?]

The following commentary on the website Billygraham.org, indicates that in addition to wanting to show His love for humans, God created us to love Him and to have fellowship with Him:

God made us for one reason: so He could have fellowship with us. It wasn’t that He was lonely or needed us—but He made us in His image so He could shower His love upon us, and we could love Him in return.

With reference to Genesis 1:26, the website lookingforgod.com likewise mentions that God created humans to have fellowship (i.e., a close relationship) with us.  According to this website,

God created us in His likeness because God wanted communion with man, fellowship with man.  In other words, God created man first and foremost to have a relationship with Him.

The website Josh.org explains that the reason God created humans to have a relationship with Him was so that He would be glorified as a result of that relationship, as follows:

Some speculate that God wanted or needed human relationships, so created us to remove his own aloneness. One big problem with this thinking is that it implies something is lacking in God. And yet God is perfect, nothing can be lacking. The other problem with this notion is that God has never been alone. Consisting as he does of three persons, he has existed eternally as [a] relationship within the Godhead of the Father, the Son, and the Holy Spirit.

So why did God create humans if he wasn’t lonely? He did so to give himself glory. God created us to live and enjoy relationship as he did. Jesus said, “I have told you this so that my joy may be in you and that your joy may be complete” (John 15:11). God in effect is saying, “Become intimate with me, allow my joy to be in you, and through our close relationship you will experience the true joy of living, for you will bear the fruit of my nature—love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control (see Galatians 5:22-23). And in doing so you will reflect my presence and give me glory!”

Another website, desiringgod.org, refers to Isaiah 43:6b-7 as support for the belief that God created people for His glory, and indicates that other biblical passages also support the position that the entire world was created for His glory.

A question related to the basic question addressed in this article is:  Why did God create humans in light of the fact that, before He created us, He created angels with whom He could have a close relationship?

In the following commentary, the website Christiancourier.com indicates that God created the angels and people because of His intrinsic love for both:

God is completely self-sufficient. It is one thing to say that God created mankind because he is a God of love (1 Jn. 4:8), and it is quite another to suggest that he created angels and people because of a need to love. Jehovah’s love is simply intrinsic to his nature; “loving” was not a need that would not have been unfulfilled but for the creation of either angels or humans. The fact is, eternal love prevailed among the members of the sacred Godhead long before either angels or men had their genesis.

Although God does not need fellowship with either angels or humans, the love inherent in His nature motivates Him to desire a close relationship with both angels and humans.  Perhaps, an analogy involving humans will help to explain why this is so.

People do not have an actual need to marry, but most people desire to marry so they can enjoy an ongoing, close, loving relationship with a marriage partner.  Likewise, even though people do not have a genuine need to have one or more children, most people desire to do so to enjoy an ongoing, close, loving relationship with each child.  Thus, most people not only marry, but also have one or more children, and hope to have a close relationship not only with their spouse, but also with each of their children.  Of course, God’s desire for a close relationship with both angels and humans is much broader in scope and considerably more complex.

Conclusions

God created humans because of His love for us and His desire to have a close relationship with each of us.  And, God loves us despite the fact that we are not only born with a disposition to sin, but also continue to sin to some extent, even after having made a decision to trust in Jesus Christ as our Lord, as well as our Savior.  Furthermore, God gives every human free choice, so each of us can decide not only whether or not to trust Him to forgive our sins, but also whether or not to have a close relationship with Him.

Despite God’s love for us, many people do not choose to have a close relationship with Him, because they are indifferent to having a close relationship with God or because they do not want to have a close relationship with God, so they can avoid having to make significant changes in their attitudes and conduct.  As a result, those who do not have a close relationship with God will fail to experience the love, peace, joy, and sense of purpose they could enjoy if they had such a relationship with Him.