Well said. I believe most programmers overlook the business utility of the product. You can have the product with the best quality code but users are not going to adopt it unless it solves their business problems. Code quality has nothing to do with the user acceptance of the product. With the entrenchment of WP in CMS space, OP is unlikely to unseat WP by rewriting the WP with the best possible code quality.
A few years ago, while searching for a development role, I was rejected by couple of people at a company with feedback that my code sample was not of good quality. Later I got the chuckle when I noticed the same people subscribed (paid) to my service that uses the provided code sample.