So does science.
>Heck, the earth use to be the center of the universe according to religion.
That's a gross simplification. See: Ptolemy and Nicolaus Copernicus.
It was actually "common knowledge" in the scientific community that the Earth was the center of the universe. The popularized issue between Galileo and the Catholic Church (and not just "religion") was largely political. The Catholic Church, to retain power, could not be wrong about anything. If they had been teaching (with scientific backing even!) that the Earth was the center of the universe. That was how it must be.
Galileo wanted to educated people outside of the scientific community that the Earth was not the center. So he had to be silenced, else the Church would be wrong and may lose power.
As early as 300~ B.C.E , there is a reference from Archemedes' book "The Sand Reckoner" of a heliocentric system described by Aristarchus of Samos. [0]