Writing professionally means producing stories that are salable. Being salable is, in part, meeting the needs of the reading public by giving them satisfying, interesting, and challenging stories. Editors are attuned to their customer base and routinely reject pieces that might be of excellent literary worth but would not resonate with their readers. If someone wants to earn a living at writing they have to focus on current fads, current tastes, and the whims of the reading public.
But there is another side to writing and that is to express a thought, an emotion, a vision, or a hope that bears on the human condition without hope of a sale. This is writing as an Art, putting down something because it needs to be written. Much of what is produced solely as Art might turn out to be crap (Sturgeon's 90% rule) but it can also be something new and exciting.
I have a trunk and, in that trunk, are the unsold stories and pieces of stories I've created over their lifetime. The number of stories in the trunk reflects my ability, rate of production, or willingness to finish the pieces enough to sell. As I've improved in skill, the proportion of unsold pieces in my trunk has diminished in relation to my total output. Occasionally I pull something, a finished story that did not find a willing editor, or an unfinished story that could be brought to fruition with a little effort, from the trunk and make a sale. Rarely, and in direct proportion to the age of the piece, I've managed to sell an old story, but usually not the oldest since they reflect a time when I was not nearly as accomplished nor skillful.
So which path do I follow - to write what is in my heart or to write what I think will sell? Years ago an agent told me that, with my name, I should write stories about war, action-filled pieces with heroic characters in dire circumstances. Instead I've written more thoughtful pieces, some of which focus on military conflict, but most do not. My stories range all over the map and mostly concern modern society, occasionally something in the news, or even arise from a vagrant thought as some half-forgotten memory catches my imagination. Whatever, I write what is in my heart as best I can and then search for an editor who will appreciate it. Writing as an art is my motivation.
But it is nice to make a sale.