The children have gone to court with the idea that it is a place where honesty and the law and justice can be found. They expect that it will operate according to these expectations, and they also expect the people there, particularly the judge and the other lawyers, to act the way they have seen their father act.
Their disappointment is deep and powerful as they see people abused, people unwilling to listen to or even acknowledge the truth, and people they trust and care about demonized and treated poorly. As children, they idealize the way court should work and when their vision of propriety is smashed by the biased and cowardly nature of the people in the court, they are absolutely distraught.
Jem's tears are a product of this hurt and misunderstanding as they try to make sense of a miscarriage of justice while also dealing with the fatigue and worry they feel from having spent all day in court desperately trying to understand what was happening.