In the beginning God was alone. He created man in “His own image” in order to have eternal companions. Therefore out of Adam, God created Eve to become his wife.
Gen 2:21 “And the LORD God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh...