>>102036087From the beginning, they knew how they were going to end it, with Aang defeating the Firelord nonlethally. It may not seem like much, but just like any project, it allows for proper pacing, character growth, and exploration, even if the actual end has attracted some criticism.
Once you have that end point, you can be flexible with the introduction of villains and characters.