This may be true for nonfiction, but I think it's a little more complicated when it comes to fiction.
And writing for money isn't a bad thing at all. I made a good living at it for decades. Don't imagine that it was because "I had something to say" - for the most part, the "something to say" was dictated by marketing and engineering. My motivation was to make the reader's job easier and help them to accomplish their goals. Money was my reward for doing it well consistently.
For a fiction writer to "write for the sake of writing" certainly doesn't equal "writing for money." I'd say that it's a love affair with words, but the ideas don't always seem hugely important and when we imagine that no one else would find them interesting, it can certainly lead to what some call "writer's block."
Sometimes, the writer struggles with whether they really want to share a thing with the world. Great writing is, as Red Smith put it, "Easy. You just open a vein and bleed on paper." Great writing nicks bone. But writers should spare themselves AND their readers a messy, public, self-evisceration.