The ending settles the argument that drives the whole film, whether Voldemort has returned, and it settles it in public. After the battle at the Ministry, the wizarding world finally accepts that Voldemort is back. Fudge admits it and leaves office, and Dumbledore returns to Hogwarts as headmaster and tells Harry what the prophecy means: neither Harry nor Voldemort can live while the other survives.
What does the ending actually change? In my opinion, it changes who holds authority more than it changes who holds power. For most of the film the Ministry's denial is the real obstacle: it sends Dolores Umbridge to teach Defense Against the Dark Arts, she bans real practice of defensive magic, and she then rises to Headmistress. Fudge's resignation removes that obstacle, and Dumbledore's return as headmaster restores the school to the person who believed Harry from the start.
Why does Sirius die at the Ministry? Harry follows a vision of Sirius in danger, and Death Eaters ambush him and his friends while they try to retrieve the prophecy. Bellatrix Lestrange, who escaped from Azkaban earlier in the film, kills Sirius. It could be argued that the vision is the cost of the Occlumency lessons Snape was meant to give: Dumbledore arranges those lessons to shield Harry's mind from Voldemort, and the trip to the Ministry shows what happens when that shield fails. Voldemort then fights Dumbledore, briefly possesses Harry, and flees, so the film shows the two wizards in open combat for the first time in the series.
How does the ending compare with the films around it? Harry Potter and the Goblet of Fire, directed by Mike Newell, also featured Ralph Fiennes as Voldemort, but this film is the first to show Voldemort fighting Dumbledore directly. Harry Potter and the Half-Blood Prince then picks up the consequences, with Voldemort's power growing and the danger spreading from the wizarding world into the Muggle world. That makes this ending the hinge between a school story and a war story, and perhaps the reason the final shots favor Harry's friends over the prophecy itself.
Production context supports that reading. David Yates directed this film at 138 minutes, the second shortest of the eight main films, and Michael Goldenberg wrote the screenplay because Steve Kloves, who wrote the first four films, was unavailable. A tight script leaves little room for epilogue, and the film closes by setting up a larger war against Voldemort and the Death Eaters. The film also carries more than 1,400 visual effects shots, with Double Negative creating more than 950 of them, which suggests that much of the budget went into the Ministry battle and the Dumbledore and Voldemort duel rather than into extra scenes of recovery.