This particular scene is short, but very interesting to explore. In general, the men have come to get Tom Robinson. They do not want him to stand trial, and they are upset that Atticus Finch has decided to defend him. Instead, they want to wreak their own sense of mob justice, inflamed by racial hatred.
The men want to assert their white supremacy. Particularly, these men are poor white trash. The comment is made that these men are the most threatened by kind or fair treatment of blacks because it endangers their slightly higher status on the social ladder.
Beyond this, the theme of racism is illuminated through the eyes of the Finch children. Atticus, anticipating this possibility, has taken up post outside the jail. His children, without permission, come to spy upon the scene, revealing themselves out of fear for their father.
Luckily, the presence of the children, their innocent outlook on the mob (particularly Scout's recognition of one of her friend's fathers), and the calming presence of Atticus diffuse the situation and prevent a violent riot.
The mob has come to the Maycomb jail where Tom Robinson is being held before his trial. They want to be sure there is no trial.
Harper Lee based the alleged rape of Mayella Ewell loosely upon the 1931 arrest and trial of the Scottsboro Boys of Alabama. Nine black teenagers were riding on a freight train in search of employment. There were also white men who were on this train, and some of them tried to force the black men off, declaring the train "a white train." When they were beaten in the ensuing fight, some of the white men jumped off the train and falsely reported to the authorities of Paint Rock, Alabama, that they had been attacked by "Negroes."
There were also two white women who stepped off the train. These women, who were suspected prostitutes, falsely accused a group of the black men of rape. (They were later examined by doctors and no signs of rape were found.) These women may have lied about being raped to protect themselves because they could have been arrested for violation of the Mann Act by crossing a state line "for immoral purposes." In similar fashion Mayella lies when she accuses Tom of raping her because her father does not want anyone to know that she has kissed Tom.
In the 1930s it was not uncommon in the Jim Crow South for lynch mobs to come after any black men who were suspected of raping a white woman. A lynch mob arrived in Scottsboro, demanding that the arrested teens be released to them. But the sheriff stood in front of the jail door, threatening to shoot anyone who tried to take them.
In To Kill a Mockingbird, Atticus Finch sits in front of the jailhouse door, and when the mob arrives, he tries to keep them away from the door. The Old Sarum bunch demand that Atticus hand over Tom, but he refuses. Fortunately, little Scout, who has followed her brother and Dill to the jail, recognizes Mr. Cunningham and speaks to him. Mr. Cunningham talks to Scout, whose innocence convinces him to order the other men to leave. They return to their cars and drive away.
The linch mob came to the jail to kill Tom Robinson, but Atticus knew something like that would happen to Tom so he was there to protect Tom Robinson from getting killed