The languages and systems change. Some time ago, I had a job freshening up a large, ~30 years old Common Lisp project and it worked mostly fine, with minimum changes attributable partly to evolution of Linux, and partly to some pieces of code being older than the ANSI Common Lisp standard. I don't believe it would be as easy with Python or JS.
That said, I don't buy "software rot" as a proper name. Software does not "rot". The concept of rot implies an internal change that makes something fail whether or not the environment around it has changed. This does not happen to digitizes data. Programs only stop keeping up with the Red Queen's race of computing environments.
I have code I wrote 20 years ago that still compiles and runs. I could check again but I don’t think any of it rotted.