The ending of X-Men: The Last Stand closes both storylines at once: Wolverine kills Jean to end her rampage, and the battle on Alcatraz ends with the Brotherhood broken. Magneto is depowered by a cure dart and sits alone at a chess board, where a piece twitches slightly, which hints that some of his power may remain. Storm leads the school, and Rogue chooses to stay on as a student.
Why did Wolverine have to be the one? His healing makes him resistant to Jean's power, so he is the only person who can get close to her. In my opinion, that choice is the most deliberate beat in the film, because it turns the love triangle with Jean and Cyclops into a final act of mercy. It could be argued that the death lands with less weight than it should, since Cyclops is already gone and the film has little time left to mourn either of them.
What was the point of X-Men's Last Stand? The cure is the political argument and the Phoenix is the personal one, and the ending settles both. Mutant rights advance, Magneto loses the power that defined him, and Storm inherits the school from Xavier. The chess piece is the one loose thread, and it is the film's quiet way of saying that Magneto may not be finished.
In my opinion, the title promises a finish that the series did not deliver. Ian McKellen and Patrick Stewart both return for Days of Future Past, and Logan is still haunted by Jean in The Wolverine (2013). Marvel Studios now has its own untitled X-Men film dated for May 5, 2028 in the US, directed by Jake Schreier, according to TheWrap, and the details are tracked on the new X-Men movie page.