Similarly, writers don't write simply to fill time (that's called doodling). Writers also have goals or purposes when they write. Like the purposes readers bring to a text, writers write to inform, entertain, persuade, reflect, explore new ideas, release emotions, etc.
The most effective messages arise when the writer's goal matches the reader's goal as precisely as possible. In other words, when I write to explain the rhetorical context and you read to understand the rhetorical context, then those matching goals help me communicate with you. My text could still be flawed, and your understanding of my text could be flawed, but at least we're working toward paired goals that make the message most likely to be communicated. Readers and writers get into trouble when they work at cross-purposes, say when a writer tries to inform but the reader is looking for emotional self-reflection.