(Making software is difficult. Adding publication pressure is not going to help the process.)
So, there is a second class of people, called scientific programmers, who might do what you imagined. However, their work is undervalued. For example, although they are often listed as authors of scientific papers, they will almost never be first author. And this type of people will also be the first to disappear if funding dries up. Further, when writing scientific proposals, nobody thinks about hiring a scientific programmer, or it comes as an afterthought.
I think (or perhaps hope) the future may hold something different though. There are some industries such as bionformatics where the boundaries between science and scientific computing are being blurred. Whatsmore, I think this blurring of lines between science and computing will continue as a generally trend. Steven Wolfram (Mathematica's creator) articulated this, albeit poorly and hubristically in a "New Kind of Science". That work gained rightful criticism from the majority of the scientific community, but it did articulate a clear trend - scientific research and computation are becoming increasingly intertwined.
We may not differentiate so sharply between the types of work you describe in future, and perhaps value scientific programming more.
There are now fellowships in the UK specifically aimed at scientific programmers: https://www.epsrc.ac.uk/funding/calls/rsefellowships/ . Even so, currently there no real career path for scientific programmers. Hopefully this will change in the future!