JUSTICE, LAW, MERCY, & GRACE
Justice is the ideal state of ethical affairs. Perfect justice happens to a person when he has exactly what he deserves. Universal justice happens when every sentient being has exactly what he deserves. There is a definition problem here. If justice is defined as "getting what you deserve," one could ask what is meant by deserve. One deserves what is just. Circular. The best possible non-circular definition of justice is: receiving the same pleasure to displeasure ratio as one has expected to cause in his sphere of influence by his willful actions. Anyone who challenges this definition is hereby challenged to offer a better one.
Law (ideal ethical law) is a set of rules designed to achieve justice. Good laws promote greater justice; bad laws promote the opposite. But no matter how good a set of laws may be, law can only approximate justice. There will always be exceptional cases in which obedience to a just law produces an unjust result and vice versa. Therefore a good set of laws includes a provision for override by a personal being - a judge, also a set of provisions to ensure the ethical behavior of the judge.
Mercy is a condition in which a personal being has the inclination to punish an offender under his power, and refrains. If the offender doesn't deserve punishment, mercy is just. If the offender deserves punishment, mercy is unjust. Just mercy is a counterbalance to law; unjust mercy is a counterbalance to justice. Once again, there will be exceptional cases in which just mercy produces bad results & v.v.
Grace is commonly defined as undeserved favor. By this definition, it is unjust. This does not necessarily mean it is bad. The good/badness of an act can be evaluated according to its intent or according to its result. Intent and result are separate categories. Undeserved favor may well be motivated by good intentions, but its results may as easily be bad as good. The recipient will be in a state of debt to the donor, which may benefit the donor, but does not promote justice unless the recipient pays back.
If grace is defined as favor which is not legally required, it is ethically neutral.
Favor may be deserved, but not legally required. In this case grace is just.
Perfect universal justice, even if theoretically possible, is self-annihilating. Even if everyone has exactly what he deserves, some people will desire better than what they have. If a person doesn't like having what he deserves, though he doesn't deserve the opportunity to get better than he deserves, he deserves the opportunity to deserve better than he has. To deny him this opportunity would be unjust. The only way he can deserve better than he has is to dish out some undeserved favor. As soon as he does that, the justice balance is upset. This is not to say that we should give up the effort to achieve perfect justice. The fact that it is an unstable state of affairs does not negate its value. All life is unstable.