Being pious (devoutly religious) does not equal righteousness. The Crusaders were pious, Islamic terrorists are pious, many dictators are pious. But they behave(d) in unrighteous ways, often using piety as a justification for their actions.
What matters isn’t whether one believes in God, but what kind of God? Even many Christians get it wrong. Their example is Jesus. Yet Christian behavior is often totally at odds with how Jesus behaved (as far as we know).
If you believe that God is angry and punitive you’ll treat people that way. If you believe God is merciful and gracious you’ll treat people that way. This doesn’t mean people should get away with murder. But it does mean they should be treated like brothers and sisters who need help. Hate the action, but not the person.
This means addressing the behavior, but being compassionate toward the person. You can end a relationship without hatred. Without holding someone by the throat. You can defend yourself without hatred also. And you can correct children without breaking them, or destroying trust.
The same spirit applies to the law, and to international relations. Everyone should be treated as sons and daughters of a loving God. Law, and national defense, are not about punishing the “wicked”. Or discarding some people to protect others. Survival means nothing without love. Even survival of an entire nation.
It’s not okay to let destructive behavior reign. But neither is it okay to dehumanize perpetrators. We must exercise restraint. And choose to see others as ourselves when making judicial decisions in our personal lives, in the justice system, and in international relations.