Often, writers don't know. They're writing what they want to say. And they're hoping that if they say it well enough, an editor will like it, it will get published, and the audience will be the publication's problem.
On the one hand, I admire this stance. It's the "I'm creating what my muse inspires me to create" position, and I'm sure it has resulted in some of the most compelling art ever made.
On the other hand, I don't buy it. The author comes to the page with a worldview, and whether she is aware of it or not, she is creating through the lens of that worldview. Embedded in every sentence, then, are assumptions—about what the reader already knows, about the language that will touch her, about what she finds thrilling or sad or puzzling.
In beginning writers, lack of audience awareness typically results in mechanical problems like disjointed prose; their writing may make sense to them, but it doesn't hold together for their reader. And I've noticed that experienced writers who eschew audience often disappoint. They follow their muse into plot dead ends or long digressions, unaware that they lost their reader's attention long ago.
Plus, isn't being published for being published's sake a sort of empty proposition?
Me, I write to connect, mostly with kids. I write for them, not for myself. I care about reaching them.
The Aldo Zelnick series' audience is 7 to 12 years old or so, is familiar with American pop culture, and can relate to a suburban middle-class life. I'm conscious of this as I write. The stories are told in Aldo's voice, so it's through him that I talk to this audience. They're Aldo's peers. Kids just like him. Kids like McKaiden (pictured above).
I write for the McKaidens (and the McKaylas) of today. Who do you write for?