No one claims that the Church’s policy of compulsory clerical celibacy causes homosexuality or pedophilia.
The Church instituted the policy in the Middle Ages largely to confront corruption in the clergy, specifically nepotism and simony.
The Church could not have known, centuries later, that by creating an all male institution where relations with the opposite sex were expressly prohibited, that they would have ended up creating an atmosphere very appealing and attractive to homosexuals and a very large homosexual subculture within the Church which exists to this day.
What is it about the Catholic Church's discipline of celibacy that causes everyone to flip out? Abstinence and chastity are such mind blowers to the modern world.
Your assertion that the discipline of celibacy was a purely pragmatic measure designed to reduce corruption in the Middle Ages is utterly false. There is a long and deep theological foundation for it and historically, the Spanish Council of Elvira (295-302) is the first recorded case of actual enactment (as oppsed to its theological underpinnings which go back much further).