Give people power, and they will seek transgression as proof of that power. What's the point of being supreme earthly authority over people if you have to just sit there and follow the rules? Rules are for little people, are you calling me a little person? Watch me prove my status by committing abominations and not getting punished!
This is especially the case when you load up the stakes with anxieties and resentments and jockeying for power with others and cognitive dissonance and all that jazz. Now they don't just want to prove their made-man status, they need to. And that's not even including malignant narcissism in the mix.
And the thing is, there's a whole category of people who are legitimately impressed by this, who see rule-following as a hallmark of losers, and rule-flouting as a hallmark of winners.
See also: trump voters, cart narcs, anti-maskers, karens etc etc.
The priesthood is an absolute magnet for these kinds of people - and also a magnet for people struggling with shame, hoping to overcome it by being all holy-like, for instance, existing pedophiles.
And on top of that, corrupt power structures like this very often have a culture of mutually-assured destruction: people end up required to do something horribly incriminating themselves so they can't blow the whistle on others - and once they start down that road, the justifications start piling up. See also David Cameron and the pig, and police in general.
Layer on a teaching that the reputation of the organisation must be protected even at the cost of people's own children, and yeah, perfect storm.
No way in hell has this only been happening for the last few decades; it's only in that timeframe that the church's power has diminished enough for word to get out.