If the requirement is that it lasts 30 years, you can choose more timeless languages like C, over say Rust.
And yes, way too much research code reads like somebody's first coding project.
Moreover, people tend to forget that scientific software evolves much more slowly than commercial software and the number of people who work on this are much fewer, so why always adopt the newest method, if the code is still working. Show me commercial projects that have had the stability of something like LAPACK or BLAS, those essentially had a stable API for > 50 years now, with very few bugs.
But to be honest, I've seen this in industry as well from software developers. So maybe it's just a law of software development that's amplified in scientific software.