Scientist P observes a phenomenon X and develops a complicated ad hoc theory PR to describe X.
Then scientist E reads about theory PR and he realizes that theory PR can be replaced by a much simpler non ad hoc theory ER, which also describes phenomenon X.
Who is more in line with the aim of science, according to philosophers, P or E? One could argue that P is because P was the first to explain phenomenon X. But one could also argue that E is since his theory not only explains X but also does it in a simple non-ad-hoc way.
Really the essence of my question is "Is E a scientist?" or "Is E doing science?". I ask this question because I wonder whether science is about predicting outcomes of experiments or about understanding the nature of our world. If science is only about predicting outcomes of experiments, then E is not really doing science by proposing his theory ER, since it did not add anything to PR, which describes X perfectly. But if science is about understanding the nature of our world, then E is definitely doing science since his theory ER adds to our understanding of phenomenon X, even though theory ER predicts the same thing as PR. I understand that different positions are possible and would like to see arguments for both sides.
My question was inspired by the Relativity Priority Dispute. According to some historians/scientists, Poincare really deserves credit for relativity, not Einstein, and in my scenario above E could be Einstein and P could be Poincare. But I am not at all claiming that the scenario above is historically accurate.