I carefully followed the "always write quality code, unless you're writing a prototype" advice during my career as freelancer and software developer. I was convinced pretty early that avoiding to do code reviews, testing, QA or refactoring doesn't make the project faster, but only slower.
Books like The Mythical Man Month by Fred Brooks or Rapid Development by Steve McConnell confirmed my thoughts. Professional experience in medium-scale companies also showed me how much money and time is wasted by not even trying to do quality work.
At the same time, I often heard my colleagues complaining that constantly maintaining good code quality or simply achieving good code quality at all is too complicated for small scale companies and small teams:
It's just too expensive to get the people able to write and maintain quality code.
If the company can hire either two persons for $3 000 per month or one person for $6 000 per month, most managers would consider that two persons will be more productive than one: maybe not by a factor of two, but still. Or the small company can hire one person for $3 000 per month and spend the remaining 3 000 for something else.
There are too many aspects to take in account in order to be able to do it within a small team.
A single person can hardly take care of the style of code, readability, architecture, design, ease of testing, testing itself, reliability, security, ease of use, performance, etc.
And it doesn't worth it.
It's not like a piece of code will remain in the code base for the next fifteen years and will be read thousands of times by hundreds of developers. Chances are, the same person will maintain this piece of software for the next five years, then just throw it away and write a better one from scratch.
I usually reply that one should remember the productivity factor of 1:10 among developers and that most of the time is spent not writing code, but maintaining it. This means that low quality code is still ways more expensive.
But is it so?
Should every company, no matter its scale, try to hire the best possible developers they can afford, and encourage them to write quality code, or there is scale above which code quality becomes just a burden, a waste of time and money?