We don't disagree on all the factors leading up to Galileo's prosecution. But we should be careful judging why he was rude to the establishment. AFAIK it had all to do with the orthodoxy, not personal ongoing grudge. It's the same visceral rejection we have for obviously wrong/broken processes. The papacy around this time was in the throes of more urgent & existential problems, and so reaching for the huge mallet to kill Galileo once and for all made the most sense. Scientific consensus was that hammer.
That aside, individual priest carried out their experiments, not in the name of the Church. The Church had already leaned towards scholarship by this time (post-Bologna) and being the dominant component of all European cultures, it only made sense that it would attract people with interests in science and experiments. (By the time we had scientist-priests people didn't know why they were Christians, to begin with.) This is discounting roles in Church or its bodies—usually monasteries—that required a vow to dumbness.