Many priests enter the church because they believe they have to remove themselves from the problem they have, only to find it doesn't solve the problem and their calling gives them more authority and an identity that people have thought they could trust. I worked with several priests in sex offender treatment programmes, and their belief that their god would forgive them their sins prevented them making much progress at all.
The main church organisations all have child protection/safeguarding policies now, and know only too well that they have a duty to act where there is any risk to children. Priests who practise their religion will insist on their right to worship, and trying to persuade their superiors that they should only worship in a safe setting, not in the presence of children who are fodder for their masturbatory fantasies, is well nigh impossible. The church superiors often believe that prayer will banish deviant sexual thoughts and feelings. It doesn't!