As we are told in Chapter 1 of William Faulkner's A Rose for Emily, Miss Emily comes from a respected and powerful Southern family that, through time, has lost its power and its reputation.
According to the townsfolk:
People in our town, remembering how old lady Wyatt, her great-aunt, had gone completely crazy at last, believed that the Griersons held themselves a little too high for what they really were. None of the young men were quite good enough for Miss Emily and such. We had long thought of them as a tableau, Miss Emily a slender figure in white in the background, her father a spraddled silhouette in the foreground, his back to her and clutching a horsewhip, the two of them framed by the back-flung front door.
Here we see that even the town had the understanding that the Griersons are merely part of their town's past, and a clan that resists change. In turn, this resistance affects the town's progress. Not to mention how it stirs the town's curiosity, especially when a "curious" smell continues to emanate from Miss Emily's home.
Homer Barron comes from a totally different stock. He is described in Chapter 3 as:
..a foreman named Homer Barron, a Yankee—a big, dark, ready man, with a big voice and eyes lighter than his face. The little boys would follow in groups to hear him cuss the riggers, and the riggers singing in time to the rise and fall of picks. Pretty soon he knew everybody in town. Whenever you heard a lot of laughing anywhere about the square, Homer Barron would be in the center of the group.
There we totally see a contrast between Homer and Emily. The latter is a former aristocrat who is still resentful about the changes in the new South, while Homer is a charismatic and all-too happy go lucky fellow with a shady past. We wonder how Emily could have picked Homer, of all people, to be her companion. Most readers agree that she does that out of rebellion against her cousins from Alabama, who think of Homer as a no-good character. However, considering the manner in which Emily preserves Homer's body after poisoning him, it is safe to argue that she also needs his companionship. She is obsessed with him.
Therefore, although Emily and Homer come from completely different backgrounds, their common needs bring them together as different as they are.