I've worked in research for the past four years, during my master and PhD thesis. And although I did research in physics, my main day-to-day work has been developing software. The software projects were either the large-scale simulation code, some post-processing code or the analysis.
There is a discrepancy between what a researcher is gauged by, and the work which is needed to write good software. A good researcher produces physical results, publishes a bunch of papers which reek in a lot of citations. The only thing that one describes in the papers are the theoretical methods and the results. The details of the implementation are of no concern to the audience of the paper.
The people who work to obtain the results are very much interested in the implementation, as they have to work with the code on a daily basis. They also have to implement new features in order to produce the next physical results in the future. Usually the physical results somehow built upon previous results, making it a necessity to have maintainable and extensible code. And this is where the trouble begins.