Black Panther's powerful ending, with T'Challa realizing the importance of interconnectivity between African Americans and those still on the continent, is one that resonated within many viewers. Seeing T'Challa give the gift of Wakanda to those in Oakland created a feeling of completion and hope that makes it one of Marvel's best film endings. However, that resonance could have been muted if the film went with its original ending.—
According to CinemaBlend, editor Michael Sawver talked about how the original ending, which included T'Challa's speech to the UN, became a problem point for director Ryan Coogler.
"With reshoots Ryan wanted to do a new ending, and it's a whole bigger thing with the scene where Killmonger dies," he said. "...What we shot originally, and in the script, was Killmonger saying, 'It's beautiful, but what are you going to do for everybody in the world who can't see this?'...And it was great. It was powerful, it was awesome, but it was problematic for a few reasons."
Coogler realized that there was too much focus on Killmonger providing T'Challa with a neat solution to his problems instead of allowing T'Challa to use his own smarts to figure it out.
"One, we realized that just as a character, for the journey of T'Challa, he can't get the answer to the movie and what he needs to do from the villain--like straight-up exactly what he needs. And that's kind of what was happening," he said. "Secondly, it was a great performance, and [Michael B. Jordan] brought it, and it was painful to watch because you kind of don't want this guy to die, but it didn't fit his character."
The way Coogler fixed his problem was to take a cue from The Godfather, which has an elegant, yet enigmatic resolution to Michael Corleone's evolution from unwilling son of the mob to a newly-minted mob boss.
"Basically, the first time you meet Michael, he's with Kay and he's telling her he's not like his family. 'That's not me, Kay. That's them,'" said Sawver. "The last scene we see him, he's telling Kay he's not like his family...But then he walks and the door shuts, and you know everything is different. But it's the same conversation! And so it's the circular nature why those kinds of endings feel like closure even though it's open-ended."
Hence Coogler's decision to bring the film's ending back to the beginning, in Oakland, where Killmonger's story began. Even though he left the city as a villain, his spirit was able to return as a healing force in the form of T'Challa building the outreach center. This resolution also shows how T'Challa came to these conclusions himself after being changed by Killmonger. The UN scene was cut from the final cut of the film and instead became a mid-credits stinger.
In short, this just goes to show how masterful of a storyteller Coogler is. He made a great film even greater by simply being mindful and thoughtful, two qualities every director should have.