It's an unpopular truth for our industry, but the point of commercial software development is not to write good code; it's to write profitable code.
There are some cases where the most profitable code is also good code. We like those.
But in most (99%+) cases, the code is not going to survive contact with the market and so spending any time on making it good is wasted.