Gary Wills engages in very interesting discussion of this subject in Papal Sin. Those tormented by pedophelia or homosexuality may become so self loathing that they gravitate toward a denial of all sexuality. A life under an oath of celibacy there they do no harm becomes a most worthy goal. This is certainly far from the celibacy described by St. Paul - "I wish that all men were as I am." The ill motivated fall into temptation, and then, once the harm is done, are protected by a culture that claims infallibility at its pinnacle, and is therefore moribound. Furthermore, the church has always protected its own. One need look only tension between discipline for the clergy by temporal versus ecclesiastical authority. The Purgation of Criminous Clerks in the reign of Henry II comes to mind.
This is not a guy I would go with confidence to tutor me about sexual morality.
Nor would I trust his re-casting of history. Wills is the guy who portrays King Henry VIII of England as a loyal son of the Church whose hand was forced by Pope Clement VII, who stupidly refused to condone the dumping of loyal Queen Catherine for her vivacious and fecund lady-in-waiting, Anne Boleyn.
So lets set Wills aside for the nonce, shall we?
To our subject: it is understandable that some men of good will who are deeply conflicted by their sexuality would seek to live honorably under vows of celibacy; however, they should never have been accepted as ordinands, and would not have been if seminary rectors had been obedient to Pope John XXIII's ruling in 1962 that nobody with a significant homosexual tendency should be admitted to the priesthood.
Yes, it was a matter of disobedience. The problem is not that the conduct of the clerical state was so Catholic, but that it was not Catholic enough.
Pretty clear in hindsight, isn't it?