If I had to guess, this is due to a combination of two factors. First, some kind of "visibility bias," where we all tend to overvalue things that are highly visible. And second, "man with a hammer" syndrome. We're programmers, so we tend to overvalue the importance of code.
But the reality is just as you guessed — marketing, sales, partnerships, content, customer service, etc all play a huge role in a business' success. They require a lot of time, too.
Not understanding this is one of the reasons many developer-founders make the mistake of taking on overly ambitious product ideas and not allocating enough time to the rest of their business.