I just write what I wanted to write. I write what amuses me. It's totally for myself.
— J.K. Rowling
It's so hard to poke holes in a sentiment like this, because on the face of it, it seems completely correct. What self-respecting writer doesn't write "for themselves" first and foremost? I know I sure don't. But all the same, I'm noticing a distinct difference between those who write "for themselves" and connect with others, whether en masse or not, and those who write "for themselves" and end up writing ... well, for themselves.
For starters, let me invoke one of my common tropes, that of the expert beginner or perpetual amateur. Constant readers know about this one; it's the idea that some creative types get just good enough at something to execute the basic moves, but never advance their game. They don't have ten years of experience; they have the same year of experience repeated ten times.
I've long felt those who suffer from this attitude are the ones who write mainly for themselves in a bad way. They aren't motivated to raise their game, because they see their work as a series of finished artifacts instead of as steps in an ongoing process. If no one else takes interest in the work — or, better to say, if the work doesn't command interest above and beyond anything else out there — then it's everyone else's fault and not theirs.
One of the hardest lessons any creator has to learn is that they are not special — that not only are they quite capable of producing work that is manifestly mediocre, but that it is going to be very hard for them to produce anything that isn't. There's more out there than ever to read, to play, to listen to, to watch, and to think about. It's possible to connect with a relatively undemanding audience by offering them a rebadged version of something that's already out there (Twilight! But with elves!), but that comes at the cost of the audience having a relatively minimal commitment to the creator or the work. If you can do that, there's a good chance plenty of other people can do it, too, and so there's no overriding reason for anyone to show — how would a marketer put it? — brand loyalty.
When people talk about creative types having a brand, they are not talking about a logo, but a point of view, a way of examining things and casting them that is impossible to mistake for anyone else's work. I may not be a fan of Robert A. Heinlein, but the way he looked at things through the lens of his work was his. I am a fan of Philip K. Dick, and it's the same thing there: nobody mistakes a Heinlein story for a Dick story. (Okay, "'All You Zombies — '" might well have been either a Dick or a Heinlein story, but that's the extreme exception, not the rule.) What both of those folks had in common was being totally conscious of their worldview, of embodying it fearlessly.
I can't come back to this often enough. All creators start off by aping the outward behavior of other creators — they write stories in the manner of Kafka or Joyce Carol Oates, they make Pollock-like splatters, they play Zeppelin or Van Halen riffs. Then they figure out how to use those things to look inwards, to produce from within themselves things that don't exist anywhere outside, that can't be copied but only unearthed. But you don't go automatically from the mimicry to the mastery. It takes work, but the effort will be well spent; the greatest crime any creator can commit is in not becoming entirely themselves.