First drafting is full of freedom and promise. Where is the story going, what will it lead to? But as Edgar Allan Poe says, “Nothing is more clear than that every plot, worth the name, must be elaborated to its dénouement before anything be attempted with the pen.” In other words, know the ending in advance, before you begin writing.
An author must know where the story is going but not necessarily how the characters or the plot will develop. A writer needs freedom for those "light bulb" moments and inspiration to work out how to get to the ending.
When editing I already know the ending. Editing involves a hypercritical view of the work, identifying what needs to go, what needs enhancing, where the author trips up with repetition or when grammar and punctuation is off kilter. Dicing up someone else's baby can be tricky, but editing is about encouraging the author to see their work in a different way.