The pain of watching good people suffer while justice is twisted is a profound human experience. When wicked individuals seize power and despise fairness, they often turn the system against those with good character. In such a corrupt reality, righteous and noble people are punished and tormented specifically because of their honesty and good deeds [אבן עזרא, מצודת דוד, רש״י]. The social order is flipped, leaving the best members of society to suffer without any protection [ביאור שטיינזלץ].
Looking at this dynamic from another angle, the focus shifts from the good person receiving the punishment to the good person inflicting it. It is fundamentally unfitting for a merciful, righteous person to seek out positions of authority that require them to hit and punish others, even if they do so fairly and strictly according to the law [אמרי דעת, ביאור שטיינזלץ]. From a judicial standpoint, the legal system is warned never to punish an innocent good person merely to make an example out of them, trying to scare the wealthy and powerful leaders into acting honestly [אלשיך]. Furthermore, even in cases where strict justice actually demands that a noble person be punished, it is always better to act with mercy rather than striking them [עמנואל הרומי].
On a philosophical level, this touches upon the eternal question of why bad things happen to good people. Superficially, God allowing the righteous to suffer appears unwise and entirely unfair. Yet, true wisdom understands that God's oversight of the world is perfect. The suffering of the righteous in this life is meant to cleanse them of minor flaws, ensuring they receive their ultimate reward later on. Therefore, it is proper to remain silent and not second-guess God's methods [מלבי״ם]. This divine approach also shapes history. God refrains from entirely destroying the Israelites because He refuses to strike the small, righteous minority that remains among them [רש״י].
Internally, this struggle plays out within the human soul. The righteous and noble parts of a person represent the human intellect. It is deeply wrong to punish these intellectual forces by suppressing them and enslaving the mind to the lower, physical desires of the body [עמנואל הרומי].