Whenever you write an essay or a story, you always have at least three main characters. A writer, an idea and a reader. As in any good story, all these characters develop and change by the end.
The writer starts with the need to convey their idea to the reader or understand it better. Sometimes we only want to our indulge curiosity or enjoy the flow of writing. During the process, the writer learns about themselves and the topic, changing and reshaping it. This process can take minutes, hours, months or years. It depends on how long the "story" is and how difficult is the idea.
The idea starts undeveloped and gets filled with new thoughts and concepts. It's born from a lightbulb moment, grows in the writer's mind and strikes the reader with new insights by the end.
The reader wants to learn something new and possibly change their worldview or have a fun time. All these options make the reader an active participant. Although there's no direct interaction between the writer and the audience, there's a "dialogue" in which the reader asks questions and gets them from the text.
Every party benefits and that's the beauty of good writing. It is something I want to achieve as a result of most of my writing sessions. I want to benefit myself, benefit the idea and benefit the reader.