Collective punishment, also known as collective penalty, is the punishment of an entire group of people as a result of the behaviour of one or more individuals in the group. Collective punishments are given when there is no doubt of the offense, and that the offender is a member of the group, but it is unknown who it was. Collective punishment is usually thought to be unfair as many innocent people are punished.
Often, the authorities hope that the identity of the offender will be revealed by someone (either the offender themself or someone who knows their identity) in the course of threatening and carrying through collective punishment. The intended lesson is that loyalty to the authority is a duty, and that the denunciation of the guilty offender (or confession) is part of this loyalty and helps to prevent the punishment of innocents.
Even when the offender is not found out this way, the authorities may hope that either the group will take actions afterwards to discourage further offenses of such kind, or they might take satisfaction in the fact that the offender did actually receive punishment, plus having to bear the pangs of conscience of being responsible for the additional punishment of innocent group members.
Collective punishment was once common in schools, boarding schools, prisons, reformatories, the military and other institutions where strict discipline is routinely enforced. It was also used in times of war and armed conflict, resulting in atrocities, which is why it is now a violation of the laws of war and the Geneva Conventions. In most countries, any form of collective punishment tends to be frowned upon nowadays as it violates the principles innocent until proven guilty and in dubio pro reo.