Pantsers (as in, fly by the seat of your pants) vs. plotters. I think there must be a hybrid of the two as well.
And there are authors who start with a plan, then make changes and forget that the changes weren't part of the original plan.
I once told a friend that I had been writing a novel, but I hadn't worked on it in months. She wanted to read it anyway. When she'd finished, she asked me if I'd intended to imply that the main character was g
ay. I replied with a surprised NO...until I re-read the draft again and realized that yes, I HAD included that scene that raised that possibility. I'd just forgotten about it entirely, as, in the intervening months, I'd come up with a totally different plot line.
I think Rowling probably had the same experiences...she had an idea where everything was going, but as she thought about it, and wrote it in her head at odd moments, it evolved and she forgot she hadn't planned it to be that way from the very beginning.