The layman is often more interested in the end result, and history has provided ample evidence that the legal system doesn't do the best job at making sure the general cultural message gets across.
The layman wants "don't cut corners and kill people, or punishment". The legal system tends to deliver "Accept a plea bargain, get reduced sentence," or "Cut corners,and apply sufficient lawyer to defray the consequences."
Justice is for many distinct from the machinations of the legal system. I like to use the story told in the song "The Night the Lights went out in Georgia" as an example.
A person finds out their wife was cheating with the whole town. Gets distraught. Goes home, finds just his gun left behind. Goes to a friend's house, sees weirdly sized footprints that don't match his friend's, eventually finds his friend dead. Flags down a cop with a shot. Cop assumes he killed the friend, Judge open shuts the case, guy gets hanged.
Turns out hanged guy's sister killed the friend and the cheating wife.
Without knowledge of the sister's deeds, the legal system believes justice was served by hanging him. He killed, therefore his life is forfeit. Where's the justice when the sister is taken into account and the hanging has been done? The legal system would have hanged the sister if it bothered to work right and done nothing to the man, but as the score stands, two will have been executed for the crime, one wrongfully. The judge facilitated the death of an innocent man. Should the Judge not suffer for his dereliction of duty? What about the sister? Even if we recognize she forfeit her life through her actions, an innocent man was killed. To balance that out, it stands one must be spared. Does the Sister get let off Scot-free?
Justice != legality. We try to keep them lined up as well as we can, and collectively we begrudgingly submit to it as the best compromise overall. That doesn't mean though that everyone feels that what the legal system musters is always appropriate for the perceived wrong doing.
Messy business all of it. The messier the business, the worse the legal system seems to be at generating a long-term satisfying result.