There are different ways to write a story, some writers start from the beginning and simply trust it will go somewhere worthwhile, some aim towards a specific goal, others have a game-plan and not only know where they are headed but the entire route along the way, while yet other writers don’t write in sequence at all and write many areas at once.
I’m one of the latter. I work from a string of main points, but I don’t have to work them in order. I get my endings sorted before anything else, although I’m flexible to those endings just as I am to anything else along the way. I will follow the shaping of a book, if I like how it’s forming, I will go that way.
While I know where I’m going and I know what I want along the way, I don’t know all the kinks and twists of the plot, or even all the characters. A simple gap-filler in book 1 of the Khekarian series turned into a major event in the story, for instance. I didn’t plan for it. Along the way I met a whole barrage of characters and there’s another book there just waiting to happen at a later date.