The company should profit more because of that software;
The software, along with the company, is an organism, as this evolution occurs, the software must be able to sustain itself in a way that the cost is lower than the result it is bringing to the company;
Long-term thinking;
It is very common for a software to reach a point where the developers are demotivated to work and want to start everything from scratch, but often the software hasn't even paid for itself and has to start over, in this way the software will never be able to reach the breakeven point, balance between cost vs what it generates.
Follow the evolution of the business;
For example: imagine if Nubank goes through a refactoring process and customers have to wait for the bugs to be fixed before they can use the product again, this is unfeasible for the business, the software must be built with a long-term perspective and always following the evolution of the business.
The longer the software stays up, the more return it generates;
A software must be independent of the developer. If a person leaves, it should be easy for someone else to take on that role and continue the project in the same way it was.