Most would agree that families and communities should be managed, as far as practical, so that there is no inclination for members to misbehave or commit crimes, and as a consequence, no need for sanctions or punishment. (Occasion minor lapses need not be punished if they are mistakes and not likely to be repeated.) The idea is easiest to achieve with small coherent groups with common interests, with every individual valued and cherished.
The ideal is not commonly achieved for a diversity of reasons. Most societies and organizations apply sanctions against those who misbehave or who fail to meet their obligations. Sanctions may be applied with or without counseling, and attempts to reform. The sanctions range widely in kind. The kinds wax and wane in popularity according to fashion.