I learned the most valuable lesson of my software life back in the early 1990s when I worked at BrownStone Solutions. BrownStone sold mainframe Data Dictionary / Repository software to Fortune 1000 companies for $250K+ per implementation. Real esoteric stuff with data modeling, metadata, meta-meta data, and other incredibly uninteresting stuff to 99% of the population.
We had one competitor that we saw regularly in the market that would routinely kick our butts. None of us programmer types really knew about the routine beatings because our bosses subscribed to the mushroom management theory of running a company. In 1995/1996, Platinum Technology, headed by Andrew "Flip" Filipowski bought both of the companies. The competitor company got bought for something like 15 times what Platinum paid for BrownStone.
After several technical meetings where we were trying to come up with what our combined offering should like, it was apparent that their solution was barely a software product, it was more of a bunch of code that consultants put together in the field. How could we be losing to these guys?
As much as it pained me at the time, I learned that great software is just not enough to win in a competitive market. Without great sales, marketing, consulting, and execution, you need to be awfully lucky to be successful. However, the opposite is often true - bad software will sometimes be enough to sink a company although if you're really good at sales and marketing, then that can overcome a lot of software messiness.
Our competitor out-executed us in all the areas that I didn't even realize at the time were important. Seems obvious now but not something they taught at RPI to us Comp Sci types.