I agree, and of course it is. But the underlying issue here is that paper production is the wrong way to do science, there simply isn't enough attention to validate all those papers
That's a good point. However, it suggests to me that one should publish the code for an additional reason:
1) if we acknowledge that paper production is the wrong way to do science, perhaps papers with attached published code are a step in the right direction. A critical mass of papers that are easy to reproduce because anyone can execute the code attached with them could, hypothetically, come to dominate the zeitgeist and push out papers with grandiose but unverified claims.
Here is an incentive they could use: If a paper publishes the code it used, they can be allowed to skip the methods section about it. Describing code with words is at best awkward and usually error prone as people forget to update the text.
To be clear in my field the journals require publishing the code, but in my experience the code that gets reused gets more scrutiny, often without benefit to the researcher.