When asked if he knew the ending when he started a story, E. L. Doctorow said of his process:
It’s like driving a car at night. You never see further than your headlights, but you can make the whole trip that way.
Taken in isolation that quote can seem very freewheeling and unfettered. The romantic idea of novel writing often has this sort of outlook: just set off and every time you come to a fork in the road just choose whichever path seems most appealing.
Sounds great but this is a somewhat disingenuous view of storytelling that can lead to dead-ends and pointless detours. Even the most improvisational of writers usually know the ending they’re aiming for (even if they’re not always consciously aware of it).
It’s not often you get in your car without having a destination in mind.
But at the same time, just because you know where you want to go doesn’t mean you know what you’re going to find when you get there. What it give you, though, is a framework to help create a cohesive narrative rather than a random sequence of events that might come together through happenstance and good luck.