Economics be damned
There's a frequent complaint coming from software developers. It's about how management doesn't care about software quality or "doing things right". It's about how outages inevitably happen and nobody gives a shit that a developer called it.
Let's say a developer is advocating for a rewrite which would massively improve the quality of the codebase and reduce frequency of outages. Management isn't interested. Why does that happen? I have two stories for you.
In the first story, the developer is correct that the rewrite is worth the cost. It is true that investment in code quality would speed up feature delivery and achieve the business goals faster. For whatever reason, it doesn't happen. Maybe the management is not very bright. Maybe they understand the problem but they're judged by short-term metrics and they respond rationally to these incentives. Maybe the developer should've learnt how to build influence in the organisation and get people on their side.
In the second story, the company decided to skip the rewrite and that's the right decision. Yes, outages happen but they're cheap to deal with whereas large rewrites are risky and expensive. Management is well aware of the tradeoffs and they choose to keep the code quality at the current level. Yet the developer is unhappy. They want to work on beautiful code, they want to do things right, they want to hone their craft. But the company isn't running a coding retreat.
If you're in the first situation, I sympathise. You can see what the rewrite would buy the business yet you struggle to convince anyone it’s worth the cost.
If you're in the second situation, you're paid to solve business problems. Nobody cares if you feel you're doing your job right. If your position is "I want the rewrite, economics be damned", don’t be surprised when the people paying for it say no.