At the beginning of chapter 15, Heck Tate comes by to warn Atticus that they are preparing to move Tom Robinson to the county jail the next day, and he is worried that there could be trouble that evening. Link Deas adds that he isn't worried about any townspeople, but the Old Sarum gang could give them some trouble. Link comments that he doesn't understand why Atticus touched the case in the first place, and Atticus responds that although Tom may be found guilty and sent to the electric chair, the truth will be told first.
And this is why Atticus goes to the jail that night. He is determined to protect Tom from the very real possibility of the Old Sarum gang showing up to lynch Tom before the trial has a chance to get off the ground, which would forever bury the truth of Bob and Mayella Ewell's lies against Tom. Atticus sees it as his absolute duty as Tom's lawyer to protect him so that he is allowed the opportunity of a fair trial—or at least as fair as is possible in Maycomb.
Atticus's instincts prove accurate. The lynch mob does show up, and there are a few tense moments before the children unexpectedly diffuse the anger of the crowd who stands against Atticus. Atticus proves to have incredible instincts in every facet of this situation. Not only did the Old Sarum gang show up to lynch Tom, but Tom is convicted at his trial as well. However, through the fearless efforts of Atticus, the truth of Tom's innocence was told for all of Maycomb to hear.