One of the reasons there is a need to adopt a strong countermeasure against someone who harms you is that, if you let it pass there is a danger of that person becoming habituated to extremely negative actions, which in the long run will cause that person's own downfall and is very destructive for the individual himself or herself. Therefore a strong countermeasure, taken out of compassion or a sense of concern for the other, is necessary. When you are motivated by that realization, then there is a sense of concern as part of your motive for taking that strong measure.
...One of the reasons why there is some ground to feel compassionate toward a perpetrator of crime or an aggressor is that the aggressor, because he or she is perpetrating a crime, is at the causal stage, accumulating the causes and conditions that later lead to undesirable consequences. So from that point of view, there is enough ground to feel compassionate toward the aggressor.
from
Healing Anger: The Power of Patience from a Buddhist Perspective