The rebuild vs fix problem depends a lot on the state of the codebase and on the inherent complexity of what the system actually does.
People who don't understand the codebase
NASA has a long term/historical projects with public documenation about supporting long term project issues.
TX company that still uses punch cards (2013): https://www.chron.com/news/article/Conroe-company-still-usin...
IMHO, the pitfalls are in not understanding/being aware of the limitations/edge cases. aka Not unplugging 70's CRT TV meant TV still drew power vs. unplugging meant took longer for CRT to warm up before being able to display image. Note: For areas with frequent electical storms, power surge due to lighting strike could destroy plugged in 70's TV. Today's battery powered displays, dropping from height & destroying display more relevant risk than worrying about lighting strike causing power surge.
Unlike most mechanical hardware where have to design upfront to minimize costs/ensure things fit/work together; with software one can very easily intentionally/unintentionally 'sweep things under the carpet" in quest to 'get it done'. see [1] vs. [3]; [2] vs. history of [4];
Quote by Arthur C. Clarke : "Any sufficiently advanced technology is indistinguishable from magic."[5]
mechanical digital camera[2]; 1800's Fax machine[4]
niplo disk [1] vs. flexible dot-matrix display manufacture by offset lithography [3]
Related "Ask HN: Is human technology advancing faster than human wisdom sustainable?"[6]
-----------------------------------------------------------------------------------------
[1] niplo disk : https://web.archive.org/web/20091026194656/http://geocities....
ben heck's mechanical television (part 1) : https://www.youtube.com/watch?v=eI0TtyVEcs8
[2] mechanical digital camera : https://www.youtube.com/watch?v=KCzMLl-cB94 (vs. 1st digital image (1957) : https://www.nist.gov/mathematics-statistics/first-digital-image )
[3] : (behind paywall) flexible dot-matrix display manufacture by offset lithography : https://repository.lboro.ac.uk/articles/journal_contribution...[4] : (electro-mechanical image) : The history of faxing: from revolutionary to digital evolution in 2024 : https://novatech.net/blog/the-history-of-faxing-from-revolut...
[5] Aurthur C. Clarke quote disucssion : https://lab.cccb.org/en/arthur-c-clarke-any-sufficiently-adv...
[6] Ask HN: Is human technology advancing faster than human wisdom sustainable? : https://news.ycombinator.com/item?id=43357677