"Another beautiful theory slain by an ugly fact." I believe that is from Julian Huxley, but it could be T. H. Huxley or JBS Haldane instead.
In any case, being able to say that and move on to the next theory or idea is the central skill of a scientist. The math, experiments, field observations, and so on, are only tools. Central is to know that what you think, perhaps even very strongly, to be the case today could run in to some ugly facts tomorrow ... and then you'll have to change your mind in accord with this new evidence.
One of my encounters with this involved a notion (far too early in the process to call it a theory) about clouds. A friend was studying clouds and the snowfall from them. The clouds were in a bunch of parallel bands. This was no surprise. The surprise was that spaced regularly down the bands were 'knots' of particularly high snowfall rates. Why should such a thing happen? I happened to be looking at hydrodynamic stability problems at the time, and one looked to be about right. So I mentioned it, and he said 'Bob, there's no known surface tension effect in clouds.' Ok, I knew that, but maybe we had the first observations that there was such a surface tension effect in clouds. The thing was, the mechanism made definite predictions about how far apart the knots would be. So, we checked. The knots were not spaced right for that idea, and were nowhere near. Ugly fact slayed my beautiful theory.
Oh well, time to move on to newer and better ideas. And there is the hard part to doing science. People -- scientists included -- get attached to their ideas, or to ideas they learned long ago. Letting go of one because the data just aren't there, new data come along and show the old data was bad, or any of the host of reasons that leads us to change our minds in science ... that's hard. This doesn't mean that you must accept whatever new thing anyone presents. That would be foolish; you're certainly entitled to check under the hood, kick the tires, take the new out for a test drive. But, after challenging the new (data, model, theory, inference, ...) if you can't shake it, you have to grant it at least tentative acceptance -- even if it is contrary to something else that you like better.
3 hours ago