Why do opposites (or merely differences) attract? Well there are a lot of reasons for it, some commonsense and some psychological. But the truth is that the "mixing" of folks from different backgrounds, social strata, ethnicities, and locations has gone on from time immemorial. There is always something alluring about the exotic, and the human interest in the "other" might not only be in the mind-- it is in humanity's best interest to avoid inbreeding, so the exotic mate may be hardwired into our brains to appear attractive.
But as to Catherine and Heathcliff, though they were separated by a gulf of family and wealth (Heathcliff, an orphan boy, was brought up in the Earnshaw house but had no claim on it or inheritance, or money of his own) I believe it was their very similar thoughts and feelings which brought them together, rather than the differences between them.
Cathy and Heathcliff cared for little else, as children, other than the adventures they could have on the moor. They were both many times more active and brave than Cathy's brother Hindley. Both Cathy and Heathcliff were naturally attractive and confident; both of them had the admiration of old Mr. Earnshaw, Cathy's father, and they had little to worry about and become jealous over. Hindley, however, faced with these two wild children as competition, became cruel and jealous of his father's affection and regard. Hindley, who of the three had the most legitimate claim to "belong" -- meaning he was the rightful heir of Wuthering Heights, and would always have a place there -- felt the least sense of belonging. Cathy was somewhat in the middle, and regarded differently because she was a girl, but Heathcliff, the one who was most the "outsider" seemed to feel the most at home. He was closer with Cathy than Hindley ever was,and had won the love of Old Mr. Earnshaw, rather than having it due him as the right of a natural son, like Hindley. Heathcliff, an interloper in Hindley's eyes, has everything -- the adoration of the other Earnshaws, the physical prowess, and the overarching confidence -- that Hindley feels is his by right.
Cathy, who could have taken Hindley's side as his biological sister, aligns herself with Heathcliff because she is just like him. She is confident, physically vital, and sure of herself and of her father's love. She never worries about being displaced or replaced by Heathcliff in her father's eyes (though she easily could have,) and she is every bit as adventurous and brave as Heathcliff. It is this similarity of their characters, and their similar attitude towards life (that of a struggle that each of them must win for themselves) which draws them together.
Although Emily Bronte lived her life as a spinster, and there is no information as to whether or not she ever had a suitor of her own, it seems clear to me that Bronte wrote Cathy and Heathcliff as a true-love couple. Their utter sympathy with each other on everything outside of conventional life -- their fondness for the wilderness, the wild climate, freedom, and solitude -- made them two of a kind. Cathy had to part with Heathcliff because, as a woman, she had to think of her future and marry Edgar Linton. The world of convention and the repression of women is what came between Cathy and Heathcliff; not their feelings for each other.