How do you manage compassion for people when they are undeserving? This is a central question in To Kill a Mockingbird. The answer? A little goodness, a little humility, and a lot of imagination. While from the outside a person may seem vile, stupid, or just plain incomprehensible, imagining what it's like inside that person's head can do wonders for understanding them. Of course, there's also the danger that you'll be wrong about just how nasty that person really is, but that's the risk of being a good person.
By having Atticus be a figure associated both with justice and with compassion, the novel suggests that the two ideas are not mutually exclusive.
Tom’s compassion for Mayella and Atticus’s compassion for Ewell both get them into trouble, suggesting compassion can sometimes be dangerous.