If, in scientists' or journal editors' minds, this is an actual reason not to publish source (as opposed to any other reasons they might have), then shame on them. I can imagine the shrinking feeling when something like that comes out, but hey -- you're a bloody scientist. At least it's for the public good.
This is indeed the most commonly cited reason, but as others have pointed out it’s not a good one, and I’ll posit it’s not the real one either. The real reason is nobody in the lab has any idea if it works or ever worked most of the time.
Yes the feeling is not good. Really though the reason is that potential hit to the journal’s reputation in this case, not the feelings of the research team (who already paid the journal to submit the work after all).
You might then suggest that the journal should be prepared to also review the code alongside the claims it produced in the article — this seems like a good idea to me too but in reality would require hiring more reviewers (doubtful the tenured nonagenarians are up to the task), all while tightening the restrictions on the submitters. Just doesn’t make sense for a business.
The most compelling reason I've heard against releasing code is to encourage independent implementations. While others may find bugs in released code, they may also just use it as is extending it to test new ideas.
This could propagate any bugs in the code to multiple works. A similar problem occurs with blog code snippets that are written with shortcuts. Despite warnings that these snippets need to be expanded for production settings they are often copy pasted as is into hundreds of code bases, propagating incomplete or buggy code.
Still, you could solve for this in other ways. E.g. maybe reproduction focused journals can require reimplementation.
Yes and this already happens — check out the “cluster failure” paper documenting bugs that have been baked into statistical processing packages for fMRI analysis for years. Whole fields of science having no doubt already been built on top of these bugs, now might be a good time to start writing unit tests.