This is a good question. The children learn a lot in chapter 16. It is one of the transitional moments in the book.
First, the children learn that not all people see eye to eye. When the mob came to hurt Tom Robinson and would have even hurt Atticus, Scout is perplexed, because she thought that Mr. Cunningham (who was part of the mob) was a friend of Atticus. Here is the dialogue:
“I thought Mr. Cunningham was a friend of ours. You told me a long time ago he was.”
“He still is.”
“But last night he wanted to hurt you.”
Atticus placed his fork beside his knife and pushed his plate aside. “Mr. Cunningham’s basically a good man,” he said, “he just has his blind spots along with the rest of us.”
In this way, Scout learns that people's prejudice is at times stronger than their friendship.
Second, the children learn that people would rather be entertained than to see justice done in a law case. The court is packed, not to see a case, but to be seen and socialize. This shows many people are not very noble in Maycomb. Ms. Maudie is disgusted. Here is what Scout observes:
It was a gala occasion. There was no room at the public hitching rail for another animal, mules and wagons were parked under every available tree. The courthouse square was covered with picnic parties sitting on newspapers, washing down biscuit and syrup with warm milk from fruit jars. Some people were gnawing on cold chicken and cold fried pork chops. The more affluent chased their food with drugstore Coca-Cola in bulb-shaped soda glasses. Greasy-faced children popped-the-whip through the crowd, and babies lunched at their mothers’ breasts.
In short, the children learn that people have many blindspots, are far from perfect, and to see justice one will have to fight an uphill battle.