The climax of Harper Lee's To Kill a Mockingbird is the trial of a black man, Tom Robinson, who has been accused if raping a white woman--a certain death sentence in many Southern towns. In chapter nineteen of the novel, Atticus Finch begins questioning Tom, his client, on the stand.
The first thing he does is address Tom's previous criminal record--thirty days in jail for disorderly conduct.
“It must have been disorderly,” said Atticus. “What did it consist of?”
This simple question allows Tom to tell his story before the prosecuting attorney can use it against him. Atticus proceeds to prompt Tom to reveal the details of his previous incarceration.
“Got in a fight with another man, he tried to cut me.”
“Did he succeed?”
“Yes suh, a little, not enough to hurt. You see, I—” Tom moved his left shoulder.
“Yes,” said Atticus. “You were both convicted?”
“Yes suh, I had to serve ‘cause I couldn’t pay the fine. Other fellow paid his’n.”
His "crime" is such a harmless and understandable thing, and it is never mentioned again in the trial.
Dill asks essentially the same question as you, and for once Jem has the correct answer. Scout says it this way:
Dill leaned across me and asked Jem what Atticus was doing. Jem said Atticus was showing the jury that Tom had nothing to hide.
Atticus knows Tom's best defense is the truth, and this admission of a previous incarceration is the first step in that defense.