"In the beginning God created the heaven and the earth." Genesis 1:1
We can't presume to know God's thoughts or motives, except what He has told us through His Word. However, we can glean from the study of His Word His character, and from there, draw conclusions as to what His thoughts may have been.
So, I'm drawing some conclusions by using my imagination.
Perhaps, before God created the world and the universe, He desired to create a being that would bring Him pleasure. Particularly, the pleasure of having someone love you unconditionally and by his or her free will. So, in anticipation of this being, He created the universe, our galaxy, our solar system, and our earth for the specific comfort and enjoyment of His ultimate creation, mankind.
"And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth." Genesis 1:26
God placed Adam in a garden, and I imagine He smiled with pleasure. This being, Adam, would choose to love Him, choose to fellowship with Him. And so, Adam did. Then God, in His great joy and love for Adam, perhaps thought to Himself how much Adam might enjoy the comfort and pleasure of another (even as He did Adam). God then created Eve.
"And the LORD God said, It is not good that the man should be alone; I will make him an help meet for him." Genesis 2:18
Eve came from Adam's side, we often hear, but I wonder if from God's perspective, God saw it much more intimately. Adam was created in God's image, a creature of great pleasure, a reflection of Himself, and He took such great pleasure in that, that He desired for Adam to have the same. So, Eve came from Adam's rib and was bone of his bone and flesh of his flesh. God's love shown to Adam by creating someone who would be the close companion that Adam was to God...someone Adam would be able to love.
"And the rib, which the LORD God had taken from man, made he a woman, and brought her unto the man. And Adam said, this is now bone of my bones, and flesh of my flesh: she shall be called Woman, because she was taken out of Man." Genesis 2:22-23
As a wife, I continue to learn that I am for my husband's pleasure. That's a positive, not a negative. For, if my husband has pleasure with me, then I will find great pleasure in him, even as God takes pleasure in us. Joy. Love. Peace. All these wonderful things flow from this relationship.
To God be all Glory!