At one time, the Church was a central part of both religious and secular life. What that meant was even the atheists, were an active part of the Church, not due to faith, but due to practical and social considerations.
If one wanted to move up the social ladder, in a society dominated by the Church, it was easier to do so, by being part of the Church's cultural elite. One only had to pretend to be of faith, to open up a path for power and prestige. This explains much of the atrocity in the Church. They were many atheists, who had no faith, but who nevertheless achieved positions of power, in a Church, grounded on faith.
An analogy is the Democrat party in America. The Democrats party is the party of big government and government jobs. In spite of this connection, the Democrats do not agree with the Constitution, which is the foundation of the very Government they dominate. They achieve positions of power and prestige throughout a system, while trying to undermine its very foundation. For example, free speech is undermined by PC, the second Amendment is always under attack, the Electoral college is a target, etc.
The actions of early atheists, in positions of power in the Church, led to many of the atrocities of the Church, that later generations of atheists, would blame as coming from people of faith. As a parallel, the Democrats attempted a coup This is Unconstitutional. They were caught and they now blame Trump and Republicans for lawlessness, with the help of fake news propaganda.
The Atheist sabotage the Church, internally, by bringing their own beliefs into the Church, instigating intrigue and lawlessness. As the prestige of the Church, declined, it was not the best path up the social ladder. Like rats abandoning a sinking ship, the atheists left the Church, to looked for new ships to infect; science.