There are orders of magnitude that failed because they did not solve the right customer problem. Code quality is merely incidental the vast majority of the time.