Genesis 2: 18: And the LORD God said, It is not good that the man should be alone; I will make him an help meet for him.
God understood what it was like and how it felt for Adam to be alone, because God once dwelt alone as Elohim (the self-existent One). Elohim was lonely too and had a deep longing for a family to express His manifold attributes to. Elohim was the Creator of the universe and Adam was god over the earth, yet both had a deep longing for companionship. God then created the universe and placed Man (an amateur god) on the earth with an instruction to multiply and replenish the earth by Spoken Word creation until every son and daughter of God had come into existence.
God never intended for a man to be alone. When a man child is born, he is raised and cared for by his father and mother, then when he is of age, he will leave his father and mother and be joined to his wife in marriage, and she will love him and care for him (Genesis 2: 24: Therefore shall a man leave his father and his mother, and shall cleave unto his wife: and they shall be one flesh.), and together they will raise a family.
God designed a man’s life to always have companionship in it. Adam was not lonely for sex, but was lonely for companionship. It is this perverted age that places an emphasis on sexual gratification above God’s original intent of a man and woman being joined by genuine love in marriage to reflect the heavenly pattern of Christ and the Church (Ephesians 5: 22 – 27).