This is the broken window fallacy [1]. If the company didn't have to pay developers to maintain bad code, they could invest that money in something more economically useful, like new products.
Yes, we developers sometimes focus on making the code perfect, beyond the point where there's an actual business case. So we need to be reminded that the code serves the business, not vice versa.
But really. Bad enough code is a liability to the business. You can't add features to make the customers happy, you get bugs you don't understand, it runs really slowly, etc.
The real trick is determining, with an intelligent conversation between developers and business people, what's good enough.