That hasn't been my experience. What I've found worked is:
1. Find a potential customer who's excited about the idea of what you're going to build.
2. Build just enough to make them a mostly happy, paying customer while you secure more customers.
3. Now that you have a few customers, you have a better idea of where your architecture and business flow doesn't fit their needs.
4. Adapt to this reality, and make things robust enough that you're not spending too much time on customer support.
I follow that too, when I try a new venture, but what does that have to do with "The Code Is/Isn't Important"?
What you listed is important, but those findings are distilled into the source code of the product. If you open the source, you are providing step-by-step instructions on solving some problem that other people are prepared to pay to solve.
Basically, you come up with a recipe for success for $FOO - why would you give that recipe away unless you've already capitalised on it?