22 History, in fact, tells us that in the course of ages these festivals have been instituted one after another according as the needs or the advantage of the people of Christ seemed to demand: as when they needed strength to face a common danger, when they were attacked by insidious heresies, when they needed to be urged to the pious consideration of some mystery of faith or of some divine blessing. Thus in the earliest days of the Christian era, when the people of Christ were suffering cruel persecution, the cult of the martyrs was begun in order, says St. Augustine, "that the feasts of the martyrs might incite men to martyrdom." The liturgical honors paid to confessors, virgins and widows produced wonderful results in an increased zest for virtue, necessary even in times of peace. But more fruitful still were the feasts instituted in honor of the Blessed Virgin. As a result of these men grew not only in their devotion to the Mother of God as an ever-present advocate, but also in their love of her as a mother bequeathed to them by their Redeemer. Not least among the blessings which have resulted from the public and legitimate honor paid to the Blessed Virgin and the saints is the perfect and perpetual immunity of the Church from error and heresy. We may well admire in this the admirable wisdom of the Providence of God, who, ever bringing good out of evil, has from time to time suffered the faith and piety of men to grow weak, and allowed Catholic truth to be attacked by false doctrines, but always with the result that truth has afterwards shone out with greater splendor, and that men's faith, aroused from its lethargy, has shown itself more vigorous than before.
Source: Quas Primas (Vatican.va)