1. aside from the obviously effective but difficult to implement deterrent of meeting everyone's physical needs
I think the explanation is that growing up in an environment where even small infringements are consistently punished makes people think about the consequences more.
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.