We all know that writing quality, well-factored code is an asset for code maintenance, ease of bug-fixing, and development of new features, but I would like to approach the subject from a different angle.
If a piece of software is written well enough that it solves the client's problem(s) perfectly for their workflow, what is their incentive to purchase, or continue to purchase, a maintenance plan/contract?
Even if the software doesn't include nice-to-have X and whiz-bang Y, they can still get on with the job with the software as a tool instead of as an obstacle.
I'm not suggesting that bad code should be written intentionally for the sake of profit, because that will almost certainly fail in a number of ways. What I'm getting at is this: can software be written so well that you actually lose extra business? In this context, what is your experience with a really well-written piece of software that you or your company has produced?