> The extreme punishments for breaking the law might have something to do with it.
Historically speaking, this is almost never true. People constantly think the solution is crueler punishments and we have hundreds of years of records of what happens.
"Hundreds of years of records" sounds like a big exaggeration. I don't think we can reliable talk about more than 150 years, and even that would be sparse, covering only some lucky countries. And this data is hard to evaluate as adjusting it to culture shifts, economy changes, and even to what constitutes "cruel" in different periods isn't easy.
I think, it's reasonable to suspect that demonstrative cruelty in crime punishment may have bad side-effects in the long run, but there are just a few cases in recent history where at least short-term outcomes seem to support the claim that it may reduce crime levels.
[dead]
People who commit crimes generally do not think they will be caught and therefore the punishment is of no concern to them. The better way to deter crime[1] is to convince more of the public that people who commit crimes are usually caught. Preferably by actually catching people who commit crimes.
1. aside from the obviously effective but difficult to implement deterrent of meeting everyone's physical needs