Prior to 1615, Galileo published several works, notably the Letter to Castelli, that included a new exegetical model (interpretation) for various passages in which the sun was said to stand still or the Earth to be fixed in its place. This was at a point, just following the Council of Trent and the Counter-Reformation, when the Catholic Church was very leery of allowing “personal” interpretation of Scripture. A few priests, on three serparate occasions, attempted to condemn Galileo for heresy. On the first two occasions, the Office of the Inquisition dismissed the charges as unfounded and not worth pursuing. However, Galileo, himself, pushed the matter after being offered a chance to simply modify his claims to those of a “working hypothesis” instead of a Truth, and came to Rome, himself, in late 1615 to demand that the Church accept his interpretations of Scripture. (He had been told that if he wanted the Church to accept his “truth.” he had to prove it. However, the “proofs” he offered actually did not support his belief and, indeed, were themselves in error: he claimed that the motion of the Earth was the source of the tides. He also claimed that the planets moved in perfect circles, a point which other star watchers of the day already knew was an error.)
At that point, he was examined by the Holy Office for the first time. The result of this trial was a rejection of his claims to reinterpret Scripture accompanied by an order to stop publishing works defending heliocentrism. The initial panel included a claim of heresy, but a review board struck that language from the trial document, noting that the Church had never formally expressed an opinion on the topic.
Galileo accepted the verdict and went home. A few years later, an old friend of his was elevated to the papacy. Galileo figured that he could use his influence with the new pope to be allowed to publish on the subject, again. Unfortunately, the new pope was not interested in astronomy and was not eager to stir up the issue, again. After several more years, Galileo got tired of being ignored and published a work, Dialogue on the Two Great World Systems in which he portayed the pope as a simpleton and used that character to demonstrate the foolishness of the Ptolemaic system. When that happened, someone went back through the files of the earlier examination and discovered a letter that ordered Galileo not merely to refrain from defending heliocentrism, but even to refrain from discussing it. His Dialogue clearly discussed it in great detail, so he was in violation of the “order” that had been found in the files. Galileo aasserted at his trial that he had never seen the letter before the trial and there are some researchers who believe that the letter was, indeed, a forgery inserted by someone specifically to get Galileo in trouble, whether a member of the first examination acting independently or some later person fraudulently inserting bogus “evidence” is not certain.
However, at the time, the letter was accepted as a legitimate order from the first examination and Galileo was convicted of having violated that order.
The Imprimatur was issued simply because his books had originally been placed on the Index and by 1741 (99 years after Galileo’s death) everyone recognized that the heliocentric model was the correct one. Granting the imprimatur was a public declaration that the heliocentric view was not to be considered heresy, just in case some backwater diocese hadn’t gotten the word.
At that point the Church was reviewing and updating its views and saw no reason to hope anyone forgot anything. It would be another 40 years or so before Voltaire and subsequent people hostile to the Church would re-write the Galileo story to make it appear to be a feud between religion and science.