Many of us have experienced this as early in life as primary school.
One person in a group does something stupid, and everyone has to pay the price.
Minimal, Complete, Verifiable Example
Imagine sitting in Math class in a classroom at school. One kid is acting up, shooting spitballs at people, and so the teacher gives extra homework to the whole class.
Is there a word describing this policy? Punish everyone for the actions of one?
(BTW, not that it matters, but, IMNSHO, this is bad policy. Thx, Keith :^)