You can't punish people into being better programmers. Things don't work that way. I know that it's popular to believe that companies improve productivity by beating their employees, but that doesn't work in practice.
Law enforcement embraces rehabilitation, prevention, and other mechanisms as well as simple punishment.
Seems rather disingenuous to make a claim that negative reinforcement doesn’t work, vis-a-vis not having to be in jail.
Besides, pickpockets used to be hanged. Didn't stop them.