Because doing something crappy and mean and destructive to punish someone who has done something crappy and mean and destructive simply makes every thing worse and fixes nothing.
Some people deserve horrible punishments, but society cannot continue, order cannot be maintained and life cannot be made better if we just keep doing the exact same yucky things to bad people who have caused pain and mayhem. Lock them up so that they can’t continue to do damage and put them to work so that they don’t go mad or simply sit there and rot. But don’t give them luxuries or fun things to do, or un-limited access to communication. That would be an insult to those of us who have not caused harm.
Then try to find the root causes of why these folks have caused trouble and try to fix those situations so that other folks won’t be lead or tempted or forced to do bad and hurtful things.
IMO poverty, abuse, and mental illness cause most of our problems in society. Selfishness and greed cause another, smaller amount, of the problems. If you can eliminate most of the poverty, abusive situations and treat mentally ill people in a compassionate and cared-for situation, then teach people to be kind and compassionate, you eliminate most of society’s problems. Not all, but most.