Justice is the quality of being just; righteousness, equitableness, or moral rightness.
Retributive Justice, a system of criminal justice based on the punishment of offenders rather than on rehabilitation, has been the standard of justice for the vast majority of human history. While it has been a bedrock of most religions and governments, ancient and modern governments have attempted to institute some basic forms of restorative justice with minimal success (link).
Restorative Justice aims to get offenders to take responsibility for their actions, to understand the harm they have caused, to give them an opportunity to redeem themselves, and to discourage them from causing further harm. The better and more recent research is supportive of this concept. However, while it seems necessary, it is not sufficient. Efforts to correct societal inequality are needed to decrease harm (link).
A final thought: the culpability of the perpetrator has to be placed in the context of the findings of science that show that our concept of Free Will is probably an illusion (link).