To the injured party, justice is often compensation for wrongs committed. When property or wealth has been stolen, being made whole for what is lost seems suitable. When that is not possible, some value seems to be found in ensuring that society is protected from further predation. Whether this compensates the victim for wrong-doing is debatable. The value of compensatory punishment seems morally doubtful: no person should find comfort in another's suffering. Incarceration does serve one clear purpose: the victim has the opportunity to live in a civil society that is capable of responding to their immediate needs, rather than a society living in immediate expectation of future loss.
And here we arrive at the only meaningful functional purpose of justice: to maximize the capacity that people have to move forward. This is justice in the fuzzy sense of Solomon: looking into the hearts and minds of those involved, and trying to create conditions in which they will function better in the future than in the past.
I have not had enough experience with the justice system to know how many judges try to practice this vision from the bench. I know that civil law is ambiguous, and that part of judiciary practice is use of that ambiguity to minimize the capacity of the privileged or unprincipled to undermine the compact of justice. Recent legal history has tended to limit this practice in criminal cases, where mandatory sentencing laws minimize appeals that reference more lenient punishments given to perpetrators more likely to succeed if given a second chance.
And so we reach a distinction: there is the law, an ethical system that serves the maintenance of social order. Then there is justice, which seeks a fair and equitable distribution of power. The latter has the tenor evoked by the advocates of "social" justice. If society expects orderly conduct from its citizens, it stands to reason that it has a vested interest in seeing to it that its citizens have the education and resources necessary to live without fear. It is right, in turn, to expect that the recipients of those benefits will apply themselves dutifully to the tasks of citizenship. They will use their opportunities to seek to increase their own power.
This is a compact that leads to a reasonable definition: justice is the social implementation of love. Because it focuses on the larger social context, justice cannot always meet the standards of equity in individual cases, particularly when achieving equity will undermine the implementation of processes that sustain the survival of a larger class of individuals. Then again, in all except the most extreme cases, by preserving those processes society will preserve the resources to make the victim whole for his or her loss. The compact of justice leads us as individuals to apply ourselves and our personal resources to that end.
Justice is served in the courts, but found in the community bound together by the compact of love.