As many people here said, fiction writing can be therapeutic. The process is painful and takes you through a journey that you can not imagine at the beginning. You start with the intention of designing a world, designing characters and a plot but eventually find that you are a vehicle for the characters to come alive. The characters surprise you with what they want to become. The world surprises you with the intention to manifest in a certain way. In a way, you are a reader to your writing. This is the most obvious when you read your first draft after keeping it aside for 2–3 weeks, as I usually do.
When I was writing my first book, Whiskey And Suicide: And other stories, I started with some intention with each story but the stories just took their own life. There was something of me indeed in each story but there was something absolutely novel that I had not seen before. I write for that experience and that experience alone.
(Written as an answer to a quora question : (https://www.quora.com/What-do-you-get-out-of-writing-fiction/answer/Manik-Bal-3)