Thought experiment, imagine you build a social network that grows to be as large as twitter or Instagram, or you come up with an amazing deep learning tech that is far ahead of anything in the industry. Do you think all the companies that will come knocking at your door will care about the code quality? In the former case, if you have 100 million DAU, folks want the users not the code. In the later, if you have amazing tech, no one cares about the code quality, they want the tech, they can hire pros to fix and improve the quality.
It has to do with the buyer's ability to determine what the code quality is. I think people are limited in their ability to quickly assess code quality. Myself, I spent two days reviewing a system to give it a clean bill of health, but six months later my boss said that it shouldn't have been written at all and I agreed.
Not a perfect approach but a useful guide to find obvious code smells/issues.