Punishment/Treatment schemes vary by society because resource constraints leading to different valuations of people and goods. In some societies, a person might be very valuable (I mean, in actuality, not in terms of speechifying claims about how precious every individual is), so a harsh punishment might generate deterrence, while also generating overwhelming shame and resentment. They might also, as a society, have a much greater investment in the offender. So two days of love bombing might be just the right solution. On the other hand, if a certain taboo had been violated, the offender might have to be killed or exiled, for things that wouldn’t even merit a misdemeanor in modern nation states.
For better or worse, nation states can’t really allow towns to mete out much punishment, as the first rule of a nation state is that the state has a monopoly on lawful violence. Nor can localities qua localities “forgive” people, though, to be clear, there’s a lot of discretion in how the law is applied, which is mostly due to resource constraints, but there are (daily in the US in every metropolitan area) “conspiracies of justice” where certain crimes are ignored because the system (and it is a system) would produce a wrong result and because people still have some value to each other.