25 Penance then is, as it were, a salutary weapon placed in the hands of the valiant soldiers of Christ, who wish to fight for the defense and restoration of the moral order in the universe. It is a weapon that strikes right at the root of all evil, that is at the lust of material wealth and the wanton pleasures of life. By means of voluntary sacrifices, by means of practical and even painful acts of self-denial, by means of various works of penance, the noble-hearted Christian subdues the base passions that tend to make him violate the moral order. But if zeal for the divine law and brotherly love are as great in him as they should be, then not only does he practice penance for himself and his own sins, but he takes upon himself the expiation of the sins of others, imitating the Saints who often heroically made themselves victims of reparation for the sins of whole generations, imitating even the divine Redeemer, who became the Lamb of God "who taketh away the sins of the world" ( lo . i. 29).
Source: Caritate Christi Compulsi (Vatican.va)