They call this retribution. Hateful name!
Retributive justice holds that the correct punishment for a crime balances the wrong, and that punishing wrongdoers deters others from committing similar crimes in the future. Note, however, that Justine is wrongfully executed for the death of William. Shelley thus seems to imply that hasty prosecution, especially for the sake of revenge, might hurt the innocent, thereby creating new injustices.
At the time of its writing, there was already a concerted reformist effort to do away with the death penalty. For example, as early as 1762, Jean-Jaques Rousseau wrote in The Social Contract that "There is no man so bad that he cannot be made good for something. No man should be put to death, even as an example if he can be left to live without danger to society."