If you reference something that turns out to be incorrect due to poor data or whatever, and it gets corrected surely you would want to update your paper?
For sure, I would want to. But with how institutions currently asses and pay researchers, it would be detrimental to my career to take the time required to understand the change and update my own work, which might involve dredging up years-old data and tools, contacting collaborators around the world (some of whom might have moved completely out of academia and therefore have no interest in all in maintaining work), getting them to agree on a change, etc. It might not even be possible to update my work - maybe a piece of apparatus would take too long to rebuild, or maybe the change requires that I change my entire experimental approach. It's a lot of work to do research and write a paper, and that's why there is such a massive focus on doing it once and doing it well.
I think its infeasible for various reasons to have people maintain old work in the way suggested in the original comment. Who is responsible for it, especially if the authors have moved institutions (which happens very regularly, especially for young researchers), or out of research entirely? Perhaps there could just be a shorter window in which the work could be looked at and changed if required, and after that it is frozen forever. But that actually sounds a lot like (a more open version of) the current peer-review-then-publish system.
It sounds like you’re imaging errors propagating through citations. Paper X cites paper Y, which in turn cites paper Z, so if there is an error in Z, X and Y are—-or should be assumed to be--invalid.
It doesn’t work like that. A few citations may be “critical” but a lot of them provide context and credit. Jones et al. first identified this problem. Smith tested several obvious but ultimately unsuccessful approaches. Here, we use the same methods as Wu and Lee. Our results differ from Cantorovich because....
Errors in those papers might make sections of the citing paper superfluous or less interesting but they don’t invalidate it. For ideas and methods, it might not even matter what the ultimate result was....