In Catechism of the Catholic Church, 311, it states, quoting St. Augustine:
For almighty God. . ., because he is supremely good, would never allow
any evil whatsoever to exist in his works if he were not so
all-powerful and good as to cause good to emerge from evil itself.
Thus only God himself knows why so many souls, from a Catholic Perspective, were lost to the reformation as the Catholic faith began to dwindle in parts of Europe, perhaps as a result of the state of the Church itself. It is not lost to Catholics that as the reformation was happening in Europe, millions were converting to Catholicism in the Americas.
In the decade following that followed the apparitions of the Virgen de Guadalupe, there was a sudden, extraordinary success of the evangelizing of ten million Indians constituting the most successful evangelization ever1. A point noted by Pope St. John Paul II [the great] in his Apostolic Exhortation Ecclesia in America:
With the passage of time, pastors and faithful alike have grown
increasingly conscious of the role of the Virgin Mary in the
evangelization of America. In the prayer composed for the Special
Assembly for America of the Synod of Bishops, Holy Mary of Guadalupe
is invoked as “Patroness of all America and Star of the first and new
evangelization”.
1. cf. Timeline of the Protestant Reformation
For a good within the Church resulting directly from the reformation, please see: The Counter-Reformation, the period of Catholic revival (1560-1648).
Thus in the bigger scheme of things, and learning from the history of Israel, God permitted the Church in Europe to be afflicted, perhaps to chastise her, thereafter followed the revival of the counter-reformation. That ancient serpent, who is called the Devil and Satan - whose head is destined to be crushed by the seed of the woman2 - thinking that he might have succeeded in devouring souls in Europe, was defeated and humiliated with the millions coming into the Church in the Americas.
2. cf. Gen 3:15 (RSVCE).
In support of "perhaps to chastise her"
please see Prophecy of St. Edward the Confessor in Prophecy | New Advent. It is worthwhile to quote it in full:
Prophecy of St. Edward the Confessor
Ambrose Lisle Philipps in a letter to the Earl of Shrewsbury dated 28
October, 1850, in giving a sketch of English Catholic history, relates
the following vision or prophecy made by St. Edward: "During the month
of January, 1066, the holy King of England St. Edward the Confessor
was confined to his bed by his last illness in his royal Westminster
Palace. St. Ælred, Abbott of Rievaulx, in Yorkshire, relates that a
short time before his happy death, this holy king was wrapt in
ecstasy, when two pious Benedictine monks of Normandy, whom he had
known in his youth, during his exile in that country, appeared to him,
and revealed to him what was to happen to England in future centuries,
and the cause of the terrible punishment. They said: 'The extreme
corruption and wickedness of the English nation has provoked the just
anger of God. When malice shall have reached the fullness of its
measure, God will, in His wrath, send to the English people wicked
spirits, who will punish and afflict them with great severity, by
separating the green tree from its parent stem the length of three
furlongs. But at last this same tree, through the compassionate mercy
of God, and without any national (governmental) assistance, shall
return to its original root, reflourish and bear abundant fruit.'
After having heard these prophetic words, the saintly King Edward
opened his eyes, returned to his senses, and the vision vanished. He
immediately related all he had seen and heard to his virgin spouse,
Edgitha, to Stigand, Archbishop of Canterbury, and to Harold, his
successor to the throne, who were in his chamber praying around his
bed." (See "Vita beati Edwardi regis et confessoris", from manuscript
Selden 55 in Bodleian Library, Oxford.)
The interpretation given to this prophecy is remarkable when applied to the events which have happened. The spirits mentioned in it were
the Protestant innovators who pretended, in the sixteenth century, to
reform the Catholic Church in England. The severance of the green tree
from its trunk signifies the separation of the English Church from the
root of the Catholic Church, from the Roman See. This tree, however,
was to be separated from its life-giving root the distance of "three
furlongs". These three furlongs are understood to signify three
centuries, at the end of which England would again be reunited to the
Catholic Church, and bring forth flowers of virtue and fruits of
sanctity. The prophecy was quoted by Ambrose Lisle Philipps on the
occasion of the reestablishment of the Catholic hierarchy in England
by Pope Pius IX in 1850.