[There is] another view common to bad writers - namely, that one writes only for oneself. Do not trust those who say so: they are dishonest and lying narcissists.
There is only one thing that you write for yourself, and that is a shopping list. It helps to remember what you have to buy, and when you have bought everything you can destroy it, because it is no use to anyone else. Every other thing that you write, you write to say something to someone.
I have often asked myself: would I still write today if they told me that tomorrow a cosmic catastrophe would destroy the universe, so that no one could read tomorrow what I wrote today?
My first instinct is to reply no. Why write if no one will read me? My second instinct is to say yes, but only because I cherish the desperate hope that, amid the galactic catastrophe, some star might survive, and in the future someone might decipher my signs. In that case writing, even on the eve of the Apocalypse, would still make sense.
One writes only for a reader. Whoever says he writes only for himself is not necessarily lying. It is just that he is frighteningly atheistic. Even from a rigorously secular point of view.
Unhappy and desperate the writer who cannot address a future reader.
-Umberto Eco, 'How I Write' in On Literature, 334.