Religiously, it's a punishment undergone in token of sorrow for sin
Religious institutes and the like, to which grants of plenary indulgences, for 
instance for... [DOC] [TLE] REMORSE AND PENANCE VS. REMORSE AND REPENTANCE ... [PAR] repentance to salvation not to be repented of: but the sorrow of the world worketh 
death.3 ... punishment undergone in token of penitence for sin.