Why did Mr. Cunningham's mob leave?
After Tom Robinson is brought to the Maycomb jail, Atticus disappears for the night. Curious as to what their father will be doing so late at night, Jem and Scout sneak out of the house; they find Atticus reading out in front of the jail by the light of a single lightbulb in order to protect Tom.
A crowd is gathering... men whose faces are hidden in shadows but who smell like "stale whiskey and pigpen." Although it may be beyond Scout's comprehension, this mob plans to drag Tom from his cell and lynch him.
Scout eventually recognizes one of the men as Mr. Walter Cunningham and instantly begins to chat with him (although Mr. Cunningham isn't really responding), reminding the man of who she is, inquiring after his boy Walter, and bringing up his entailment. This small talk manages to remind Mr. Cunningham and the other men that they are all neighbors and residents of the same town, and that to do harm to one another would be unjust.
Scout's chatter breaks the mob mentality that has imbued these men with the misplaced confidence in their ability to carry out their sick, violent "justice." Mr. Cunningham tells Scout that he'll tell Walter she says hello, and the rest of the men shuffle off into the night, leaving Tom alive.
In Chapter 15, the Old Sarum bunch travels to the Maycomb jailhouse to harm Tom Robinson. Atticus is sitting outside of Tom's cell and refuses to leave the scene. The children have followed Atticus to the jailhouse and watch as the mob surrounds him. Just as things begin to look bad, Scout suddenly runs out into the middle of the group and surprises everyone. Scout begins to look for a familiar face and recognizes Walter Cunningham. She attempts to talk about his entailment and mentions that she is friends with his son. Walter Cunningham initially ignores Scout but eventually acknowledges her presence by saying, "I'll tell him you said hey, little lady" (Lee 95). Walter then tells his gang to head home. At the beginning of the next chapter, Atticus explains mob mentality to his children. He says,
"...you children last night made Walter Cunningham stand in my shoes for a minute" (Lee 98).
Walter Cunningham was able to see the predicament that Atticus was in, which affected his conscience. Walter came to his senses and realized that the right thing to do was to leave the jailhouse before someone got hurt.