The nice thing about buildings is that they last. Software is not like that. A framework for a programming problem may not be valuable in 20 years, or even 5 years later.
First, your OS probably is running some 20 year old code. Second, code can live on in the new structures and ideas it presents, rather than in their direct manifestation. We are building to higher and higher levels of abstraction.
There are so many ugly buildings I wish would not last.
There is so much ugly undocumented software not getting scrapped because no one knows what it does exactly. Sometimes it's even built on top of frameworks no one finds valuable anymore.