Here's another excellent example:
Caloric theoryThe caloric theory is an obsolete scientific theory that heat consists of a self-repellent fluid called caloric that flows from hotter bodies to colder bodies. Caloric was also thought of as a weightless gas that could pass in and out of pores in solids and liquids. The "caloric theory" was superseded by the mid-19th century in favor of the mechanical theory of heat, but nevertheless persisted in some scientific literature—particularly in more popular treatments—until the end of the 19th century.
The issue of why people stopped using caloric theory to talk about heat is historically quite complex,
Bur there is some truth in the simple version I was taught at school: crudely, there is only supposed to be a fixed amount of caloric available. You can move it around, but it doesn't come out of nowhere. Experiments showed, however, that if you turned a blunt borer in the barrel of a cannon immersed in water (so blunt that it just rubbed round and round without doing any boring, but heated up the metal of the cannon through friction), you could heat an unlimited amount of water by just running the machine forever. Hence, apparently, caloric could be produced from nowhere, which contradicts a key assumption of the theory.
According to some views of the nature of science, the fact that caloric theory made a prediction that could be proved wrong in this way did at least show it was a respectable scientific theory, even though it was a wrong one. People who hold this view would say that this is one of the differences between scientific propositions and religious ones, e.g.
A: God will make you better if you pray to be healed.
B: I prayed and I didn't get better, so your statement about God was false.
A: Well, that must be because you did not really pray to him with full faith in his healing power (etc. etc. ad infinitum)
A will never retract his proposition, whatever the counter-evidence. He just goes on and on adding ad hoc conditions to defend it against all threats from actual facts. In science one might be allowed to modify a theory to take account of new evidence a few times, especially if the result is a more general and interesting theory. But if you just keep tacking on extra conditions to deal with every new objection, the time will come when your colleagues will lose interest, you will cease to win research grants, and your articles will cease to be published in good journals.