Many systems need less than a rewrite: updated libraries, faster queries, tests, a better interface for the main tasks.
If the foundation is too old, we replace it module by module while the business keeps working.
A complete rebuild makes sense when the process itself has changed. Even then, data and proven rules are carried over.