I've worked both in early stage startups and in companies that are established and are still using their original startup code base. I've seen some terrible design decisions coupled with quality code that survived 15 years because the company had amazing market fit. It cost the developers a lot of extra time to work around the poor design decision, but the company was profitable enough to make up for the dev cost. That's the most common situation I've seen. The best codebase I've ever worked with was beautiful because the company had long lead time on sales(avg deal took 12 months) so the developers had time to refactor as needed. This company is still alive, so I consider them a success!
The other factor in code quality + business success is team size. With a big team and poor quality code, it spirals down much faster, each new bug/feature gets harder and slower to implement. If its bad code but its always the same 2 developers, they will be consistent enough in their own styles that the code base will not degrade nearly as fast.
A business that is not thriving and running out of cash, with a high-quality codebase, is heading toward a terminal failure state. Situation is not sustainable with restricted options and time to recover.
> The other factor in code quality + business success is team size. With a big team and poor quality code, it spirals down much faster, each new bug/feature gets harder and slower to implement.
Slightly generalised, this a good rule of thumb for categorising different kinds of poor code and prioritising remediation efforts. Poor code that is stable that doesn't need to be modified and rarely needs to be read and understood by humans -- it's fine, no business impact, don't touch it. Poor code that causes production outages every week or that multiplies the time and cost of each new feature -- is causing an ongoing cost to business, can estimate business case of value in fixing it, worth prioritising for fix. Per your example, if the bad design is some architectural decision that impacts many developers or many teams each time any team makes a change: increased blast radius, proportionally larger drag on business.
You like the food from a particular restaurant. Does it really matter to you as a customer, if the chefs were home trained or went to a culinary institute, whether they wing it or follow detailed standardized recipes?
Bad code quality may be a symptom of rapid iterations and not burning too much cash on development prior to achieving product-market fit. Ability to rapidly iterate and having enough cash to continue operating would both increase chance of success.
On another hand, it could be possible to have glacially slow iterations while burning truckloads of cash and still have low quality code. E.g. hiring an unnecessarily large team of high-priced developers who are not competent, or trying to operate in the context of some existing complex legacy environment that impedes rapid iterations and delays feedback signals.