Friedrich Nietzsche said this quote

Generally speaking, punishment makes men hard and cold; it concentrates; it sharpens the feeling of alienation; it strengthens the power of resistance