Well.....During the show conceptualization and development and pre-pilot season pitches [about June to December 1995] Whedon wrote out an outline of major plot points for all FIVE seasons of Buffy. He called this outline "The Plan".
It was an outline. It was not all that detailed. It did have Buffy dying at the end - as ALL Slayers do.
Season 1 was a writing mess because the show got picked up in June or July 1996 and most of the really good writers already had jobs. So, a lot of spec scripts, written by people who did not entirely understand, or share, the show's vision, got turned into episode scripts. Also, Whedon sold the intellectual property rights to Twrntieth Century Fox which did not always share Whedons vision. Also, Twentieth required Whedon to hire David Greenwalt as a kind of mentor/adult supervision since Whedon had ZERO producer-director-manager-showrunner experience at the time.
So.....Whedon's vision was diluted from the start. Greenwalt & Twentieth & WB did convince/compel/coerce/force many changes throughout Buffy's run. UPN didn't seem to care till the ratings crashed after season 6.
For s2 thru s5, Whedon & Co would add to the outline until about the end of the Christmas Break the season before, the outline was detailed enough to break episodes from. In s6 & s7 a different "system" was used.
The first 5 to seven episodes would be broken before filming started in July. The rest of the episodes would be broken and adjustments made based on how the season was going or unforseen events (Seth Green demanding to leave in s4 [although that exit was not nearly as unforseen as Whedon likes to claim]).
There were 6 to 8 different people writing individual episodes at any time and those people did NOT always agree on the character developments which is where a lot of the psychotic quality of the show comes from.
Also, Whedon never created a "Show Bible" so the writers felt justified in not following each other's (and sometimes Whedon's) lead, and, if Whedon liked you, he let you do it.
Also, Whedon claimed that the "Emotional Truth" of an episode was far more important than any plot holes or retcons or one episode recharacterizations or continuity fails needed to get there.
So....Buffy was both extremely well-planned and completely ad hoc. Hope I gave you some small idea why.