When I started writing the Station One series, I knew how it was going to end. In fact, there are big clues in the first couple of scenes of the first book, Time Up. When I wrote This Time Around, the first thing I had was the ending scene. The ending for the third book, which I’ve only just started, has been down on paper since before I finished the second. My first short story, Thought Patterns, started with the ending lines.
I’m a big fan of knowing your ending before you even get to the beginning. Storytelling is about framing a problem and taking your audience along for the ride as your character tries to fix that problem. If you know how the problem is going to resolve (or not resolve, depending on the story) from the start, you can have a lot more fun messing things up for them a long the way. Establishing the ending gives you a goal to work toward, a signpost to anchor the path your characters take on their way there.
I don’t think that means your ending has to be etched in rock, or anything like that, though. If, along the way, you find a better ending that fits with where the story is taking you—then go for it. Planning doesn’t preclude spontaneity. It makes it possible.