Essentially, they're trapped in a prison in the form of low income or poverty where significant portions of their time must be spent working. They don't understand how a prisoner could potentially or at least perceptually be better off than them: consistent housing provided, guaranteed food, medical treatment, time for education and growth. When you have such gaps with economic inequality in a society where for those on the lower end of the spectrum combined with some misconception of prison life, prison can actually seem better, you have many who tend to promote punishment over rehabilitation.
"Someone did something society deemed as negative and they're rewarded, I did what society said was positive and seem to be punished relative to those acted negatively. I struggle to survive and work constantly while this person leisures (albeit with limited freedom) and studies."
So as you coined it, probably spite.
Who know how many more criminals there might be, if punishment was off the table? Recidivism doesn't count that. So there's that social pressure too.
Its pretty easy to figure out 'why punishment', if you try.
How do you cure homelessness? You provide homes.
How do you deal with mental and physical illness? You provide health care.
How do you give people are path forwards? You provide education.
All of these things are what our societies are for. To carry on about "law and order" and even the "rule of law" without also quoting the part about "promote the general welfare" is to completely miss the purpose.
edit: I may be guilty of not listening to what you're actually saying. If you're saying there is something in the core of people that is delighted by revenge, therefore the current system, I agree. If you are saying that justifies a focus on punishment, I disagree.
Justice is the sense that good action will be rewarded, and bad actions will come to a bad end. Not "I'm gonna kill anybody that crosses me!" They are very different, and its not useful discussing this if that is not clear.
If there was no punishment for committing crimes, do you think the amount of crime would remain approximately the same and is there any good evidence for that?
What's the overall goal of punishment? We know it's not a deterrent to crime. We know it doesn't help recidivism rates. The only remaining reason I can think of is spite/hate.