Maycomb has a very hierarchical society—rigidly so. Social mobility of any kind seems virtually impossible. Perhaps this is because most people agree with Aunt Alexandra that character traits, both good and bad, are handed down by family through each successive generation. So the Ewells, for example, are bad; they are "white trash"— always have been, always will be. The Cunninghams, however, though poor, are hard-working and virtuous. They won't accept a dime in charity from anyone; and if they can't afford to pay for something in cash, they'll pay what they owe in kind.
Bob Ewell, on the other hand, is an inveterate sponger, once fired from the WPA, (a federal work program for the unemployed), for laziness, the only such instance Scout can ever recall. And after his brief experience of work is over, he goes right back to picking up welfare checks without making the slightest effort to find a new job.
Harper Lee includes both families in the story to give us a more nuanced view of life in the South at that time. Given the intense bigotry and racial hatred so graphically displayed throughout the book, it would be tempting to lump all white people outside the Finch residence into one gigantic blob. Yes, Mr. Cunningham is part of a lynch mob that descends upon the jailhouse to lynch Tom Robinson. But, crucially, he still has enough of a spark of humanity in him to be disarmed by Scout's innocence and stout defense of her father. There's no way in a million years that Bob Ewell would've behaved that way.
Atticus neatly sums up the character of Mr. Cunningham. In doing so, he unwittingly draws a distinction with Bob Ewell:
"Mr. Cunningham's basically a good man," he said, "he just has his blind spots along with the rest of us."
Replace the word "good" with "bad" and you have a perfect description of Bob Ewell, and just why he and his family are so very different from the Cunninghams.