Someone said: “What do you think of repaying evil with kindness?” Confucius said: “In that case how will you repay kindness? Better repay evil with justice, and kindness with kindness.”
“Repaying evil with kindness” (以德報怨) was a traditional saying. The point of Confucius’s reply to the question about it is that a leader should give the appropriate response to a particular type of behavior.
If he shows kindness to people who commit evil, the chances are that they will continue to act in the same way afterwards. If, on the other hand, he compels them to face justice, the likelihood of them continuing to offend will be considerably lower. This is the best way of maintaining social order.