There was purification in punishment. Not "Forgive us our sins," but "Smite us for our iniquities" should be the prayer of a man to a most just God.
– Oscar Wilde
The Picture of Dorian Gray, Chapter 20. Dorian regrets allowing the portrait bear the burden of his sins. Instead he wishes that he taken punishment for all those sins. That would have purified his soul.