My blogging engine [1] is almost 25 years old now. Have I rewritten it? If by "rewritten" you mean "from scratch", then no. I haven't. It has, however, seen several serious workings and refactorings over the years (the last great one was the removal of all global variables [2] a few years ago). Starting over would have been just too much work.
Needs shift. Expectations shift. The foundations that the code relies upon shift.
And familiarity with how things actually work inside of the black box evaporates leaving things distressingly fragile when the foundation finally gives way.
It's like when an old dam has "stood the test of time". More and more people (and business practices) wind up naively circle their wagons around presuming it will remain in operation forever and the consequences of what will happen when it finally does fail add up faster than unchecked credit card debt.
[1] https://github.com/spc476/mod_blog
[2] As therapy for stuff going on at work.