expresses
the harsh deterrent principle of inflicting exemplary punishment on one person to intimidate many others; it is a description, not an endorsement of violence.
When many people will be warned if you punish one., the saying “Kill one to warn a hundred” is appropriate.