I'm not holding the following up as "gospel"...but it does seem to summarize what I have read over the years on this issue:
The Catholic Church's position on castrati:
According to Rotten.com, in the late 16th century, "Pope Clement VIII became smitten with the sweetness and flexibility of their voices. While some Church officials suggested it would be preferable to lift the ban on women singers than to continue endorsing the castration of little boys, the Pope disagreed, quoting Saint Paul, 'Let women be silent in the assemblies, for it is not permitted to them to speak.' ... since it was illegal to perform castrations, ... all castrati presenting themselves for the choir claimed to have lost their genitals through tragic 'accident'."
"After the Pope’s official acknowledgement and acceptance of castrati, the number of these "accidents" increased dramatically. Parents seeking upward mobility towed their little lads down to a barber or butcher who separated them from their testicles for a fee.
One source estimates that, during the 17th and 18th centuries, three to five thousand boys per year in Italy were castrated . Castration was forbidden under canon law. The church condemned the practice and occasionally excommunicated the person responsible for the surgery. But the church simultaneously created a market for castrati by hiring them for its church choirs. By about 1789, there were more than 200 castrati in Rome's chapel choirs alone.
The number of castrati declined during the 19th century. In 1870, castrations were banned in the Papal States --
the last political jurisdiction to do so. (France lead the movement to ban the paractice.) In 1878, Pope Leo XIII prohibited the hiring of new castrati by the church. 10 By 1900 there were only 16 castrati singing in the Sistine Chapel and other Catholic choirs in Europe. In 1902, Pope Leo XIII ruled that new castrati would not be admitted to the Sistine Chapel. 7 In 1903, Pope Pius X formally banned adult male sopranos from the Vatican. 9The Church's last castrati, Alessandro Moreschi, died in 1922. 9
http://www.religioustolerance.org/rcccast.htm