The famous story ´Wuthering Heights´ by Emily Bronte creates the characters Heathcliff and Catherine. Catherine and Heathcliff essentially grow up together, but Heathcliff is a ´lower social level´ than Catherine is. Catherine becomes enamored with the wealth and glamour of a nearby family, and marries into it, but still has feelings for Heathcliff. He becomes jealous and vengeful.
People usually refer to this couple when talking about people who might have been a good match, but the couple didn´t see things clearly and chose other, less important things to chase. The result is that they are unhappy.