The role of justice, judgment, and mercy is one of the recurring themes in The Prince and the Pauper. Throughout this book, the reader learns about how the reign of King Henry VIII is ripe with injustice. Prince Edward, unlike the king, is naturally inclined towards mercy and justice. Being constantly exposed to the injustices of his father's rule weighs on him, but it isn't until he personally experiences injustice that he comes to understand its full impact and how to end it.
We see an example of Prince Edward's inclination towards mercy in his first meeting with Tom Canty. As the guards start abusing Tom, Prince Edward interrupts to scold them saying,
"How dar'st thou use a poor lad like that! How dar'st thou use the King my father's meanest subject so! Open the gates, and let him in!"
However, Prince Edward still does not understand the full importance of being a just ruler. He knows that Tom does not deserve such poor treatment, but he does not yet comprehend the full extent of the injustice in his father's kingdom.
By the end of the story, Edward has received the full experience of an English peasant. He has been to jail and spoken with people who the law calls immoral and corrupt. Yet, the prince soon learns that they are mostly well-intentioned people caught up in forces out of their control and imprisoned, tortured, and sometimes executed for petty or asinine crimes. Meanwhile, the wealthy and powerful live freely although they have committed much more societal harm than the paupers in the prison or the thieves on the road. Consequently, Edward is forced to reconsider all his assumptions about his father and the role of the monarch.
His experiences as a peasant instill a strong sense of empathy in Edward. When he ascends to the throne, he makes it his priority to right the wrongs of his father and usher in a new age of justice in the kingdom. Central to this theme of justice and mercy is Twain's message that to truly and fully understand injustice, one must experience it for themselves.