There are a few places where Atticus tries to keep Jem and Scout from the trial. He, of course, does not succeed, but he tries nonetheless. For example, at the first day of the trial, Atticus tells Jem and Scout not to come downtown where the courthouse is. In chapter 16, Atticus says:
"Jem, I don’t want you and Scout downtown today, please."
Atticus wants to protect his children. As the story progresses, Jem, Scout, and Dill cannot stay put. So they go to the courthouse, and the only place where they find space is with Reverend Sykes in the black section of the courthouse.
Even after the trial starts, Atticus tries to protect his children from the outcome and the ugliness of people, but he fails once again. In chapter 21, we read these words:
“I’ve no idea,” said Atticus shortly. “You’ve been here all afternoon? Go home with Calpurnia and get your supper—and stay home.”
“Aw, Atticus, let us come back,” pleaded Jem. “Please let us hear the verdict, please sir.”
The children are drawn to the adult world and they enter.