In the Symposium, Plato tells us how humans came to have the longing for love through a speech given by Aristophanes.
In the beginning, humans had four legs, four arms, and two faces on the opposite sides of a head with four ears. They were powerful and tried to invade heaven to attack the gods, and so Zeus cut them all down the middle, cleaving them into the form that we have today. Ever since, we humans have been wandering the Earth, trying to find our other halves.
The original humans came in three types, however: entirely male, entirely female, and half-male-half-female:
Each of us, then, is a ‘matching half’ of a human whole, because each was sliced like a flatfish, two out of one, and each of us is always seeking the half that matches him. That’s why a man who is split from the double sort (which used to be called ‘androgynous’) runs after women. Many lecherous men have come from this class, and so do the lecherous women who run after men. Women who are split from a woman, however, pay no attention at all to men; they are oriented more toward women, and lesbians come from this class. People who are split from a male are male-oriented. While they are boys, because they are chips off the male block, they love men and enjoy lying with men and being embraced by men; those are the best of boys and lads, because they are the most manly in their nature.