Well, that's a million dollar question.
I have an odd habit of using "you" when writing, when I mean "me". I think it's about distancing myself. Correcting it means I become conscious of what I'm writing and lose the thread, so please bear with this quirk of changing first/second person! If I was proofreading, I'd fix it, so think of it as a challenge in flexibility...
Why write? Because you want to. It matters less what you write, than that you write. And you write for your own pleasure. This is very distinctly different to writing for work. I work in IT, and there are remarkably few techs who will, without compulsion, write documents (even basic troubleshooting for an application) which is infuriating. I can and do write those documents, but that's not the sort of writing I'm talking about. No, the sort of writing that's the reason I have this blog, and hopefully that someone is reading it - although that is really an added bonus.
The teasing out of ideas, a full-on brain dump, topics of interest, be they of narrow or wide ranges. Writing for entertainment, for intellectual enjoyment.
Now this, as Virginia Woolf wrote, does indeed necessitate a room of one's own and financial independence. It means having the space to think, to write and not be interrupted by others needs and desires, or by the necessities of life, such as the making of your livelihood.
It does require energy. I've had a sod of a winter, one bad cold followed by a nasty bout of influenza, so my poor brain has basically given up on anything outside of the necessaries. I did have about two weeks of feeling okay, and blessedly, that's when Queen and Adam Lambert did their Sydney concert (life is all downhill from there). This definitely stuffed up my plans on reviewing old perfumes, because my nose was otherwise engaged. Soon my pretties, soon....
It doesn't have to be Good Writing, or Serious Writing. I do think though, that the more you read and the more widely you read, the more easily you write. The words just fall together with little to no effort because your mental ear has grown attuned to their easy cadence.
There is definitely some writing that doesn't make it out into the world, and not necessarily because it's bad. Some of it may be very, very good - but it is too close and too painful to let go. Confessional writings, the vivid nightmares that happened in your dreams and in your life. The grey depths of depression that you struggle to map and understand so that maybe, just maybe, you can deal with it and come through the other side.
Conversely, there is the writing that may one day be worth properly publishing, so why the heck would you let it out when it could be taken from you? Although I am of at least two minds about that. After all, they are just words, and if they sing to someone else, why not share them? And poetry is certainly not a way to make money, so why not? But they matter too much, those darlings of your mind, could you bear it if someone abducted them or worse, if they told you they were crap?
Alec Hope told me some of my work reminded him of the Norse sagas, of Goethe, and to keep writing. No one can take that away from me. AD Hope was one of the last classic poets of Australia, and one of the greats. After he died, his collection of poetry was sold off by a very good second hand book dealer in Canberra (no longer extant, but a lovely place to browse and, inevitably, spend money). Of course I bought an armful of books, including Christopher Smart and Anna Akhmatova. But how terribly sad. One of the great poets of twentieth century Australia, and the collection that he shaped/shaped him, dispersed.
Why write? Because you want to.