I think that's really it.

If you're working with fundamentally sound architecture (software or structural steel, I don't care), then you can recover from a shitty or time-worn implementation. If the architecture itself is shot, then going from scratch is pretty much your only choice.

There are classic old buildings (again, good fundamental architecture) I've seen rebuilt. More impressively was a company that operated near where I used to go to school. Tracor Aviation builds jets. The jets they build have numbers like 737, 777, and even (for small values -- the short stubby birds), a 747. What they do is rebuild a Boeing in place, from the ground up. The airframe is totally replaced, but it's the same bird.

...the point being that that's cost-effective.

Which is what this all really comes down to.