[T]he punisher believes that the suffering she inflicts "somehow offsets" the (perceived) wrongdoing, but even the indignant discipliner (if suffering is what the discipliner inflicts) simply in order to attain a result: in order to educate, prevent, and so on.
Source: wiktionary