If you knew the history a little better, you wouldn't quite see it that way. The church knew Galileo was right, but Galileo really pushed his luck. That's why he got in trouble.
I'm not a church apologist and obviously he got screwed, but they wanted him to go by their schedule and he told them to get lost.
LOL. So, if he was right, why did he get in trouble?
I got no use for an institution that would punish a man for being right.