Before I fancied myself a writer, I read about authors saying things like their characters took their story in unexpected directions, or their characters constantly surprise them. I thought, “Yeah, right. You WROTE them, how could you be surprised by something a character you wrote did?” It seemed very silly to me.
Then, I sat down and really started to write. Sure, there were pithy little short stories at first, but I mean really write. This was destined to be a novel-length manuscript. Then, I understood. When you get into the mind of a character and try to write naturally about what that person would do, it can surprise you. I look back at the notes I took regarding a sequel to Wings of Twilight when I was about halfway through writing the first draft and it makes me laugh. I have plans for characters that didn’t even survive the first book! I’m not going to bring them back, I just didn’t plan to kill them off at that time.
Of course, one makes all sorts of plans for their characters, then during the course of writing, you realize you need sacrificial lambs to amp up the drama, or to make the threat to your protagonists seem real. So, they become Red Shirts, as it were. The real surprise is when a character’s development goes off in a direction you didn’t anticipate when you first started planning the story, but when you go back and look at it closely, it makes perfect sense for that character as you’ve presented them. If you force them back on the path you originally intended, it can seem forced or even out-of-character at that point.