I would suggest that web browsers is a good example - IE market share vs say Mozilla. other examples are Sage vs freeagnet ?
hard to unpick market tactics and strategy from code - but it's hard to deny there is a link intuitively
Basically code quality doesn't really matter, product vision is what matters.
"Use difficulty as a guide not just in selecting the overall aim of your company, but also at decision points along the way. At Viaweb one of our rules of thumb was run upstairs. Suppose you are a little, nimble guy being chased by a big, fat, bully. You open a door and find yourself in a staircase. Do you go up or down? I say up. The bully can probably run downstairs as fast as you can. Going upstairs his bulk will be more of a disadvantage. Running upstairs is hard for you but even harder for him." -- PG
I hate to be cynical in a thread about a very optimistic and insightful speaker but I think that it will always be the case that people will trade off easy work early on for more pain late in the game. This is called hyperbolic discounting and it's an extremely common cognitive bias in humans. The only way we'll overcome this is through extensive education and a dramatic change in culture (particularly office culture).