Spoilers through Harry Potter and the Deathly Hallows Part 2.
Severus Snape (Alan Rickman) kills Albus Dumbledore (Michael Gambon) because Dumbledore asked him to. The death wins Snape the complete trust of Lord Voldemort (Ralph Fiennes), so that he can keep working inside Voldemort’s circle. Harry Potter (Daniel Radcliffe) knows none of this when he watches his headmaster fall from the Astronomy Tower.
For Harry, the person who should have helped has cast the fatal spell.
Harry sees a murder he has been kept from understanding
Harry Potter and the Half-Blood Prince
Snape signals for silence on the Astronomy Tower. Warner Bros. Pictures
Harry has every reason to believe Snape has betrayed Dumbledore. Dumbledore is weak from the cave, Death Eaters are inside Hogwarts, and Draco Malfoy (Tom Felton) is pointing a wand at the headmaster. Dumbledore has ordered Harry to stay below, “Whatever happens,” and ended with “Trust me.” Snape finds Harry there, signals him to keep quiet and goes up.
“Severus... please” sounds like the last appeal of a man who needs saving.
Snape answers with the Killing Curse. Harry has been made to watch the act while being kept out of the agreement. He chases Snape across the grounds, and he carries that night as a betrayal until the last film.
Snape has already promised to finish Draco’s task
Harry Potter and the Half-Blood Prince
Snape and Narcissa clasp hands with Bellatrix beside them for the Unbreakable Vow. Warner Bros. Pictures
Snape’s Unbreakable Vow puts Draco’s life in his hands before Harry ever reaches the tower. Narcissa Malfoy (Helen McCrory) asks him to watch over Draco and protect him, and then the last question: “And if Draco should fail, will you yourself carry out the deed the Dark Lord has ordered Draco to perform?” Snape says he will. Bellatrix Lestrange (Helena Bonham Carter) binds the promise, and whoever breaks an Unbreakable Vow dies.
Draco’s hesitation on the tower calls the promise in. Snape has to finish Draco’s task himself, and his separate agreement with Dumbledore asks for the same act. Harry has overheard Snape tell Draco, “I made the Unbreakable Vow,” so he knows Snape swore to protect Draco. What he does not know is that Dumbledore has asked Snape to kill him.
Dumbledore is already dying
Harry Potter and the Deathly Hallows Part 2
In Snape’s memories, Dumbledore is already living with a curse in his blackened hand. Snape gives him something to drink that will “contain the curse to your hand for the time being”, and warns him, “It will spread, Albus.” Dumbledore asks how long. “Maybe a year.”
Dumbledore is asking for a death that is already coming, which gives the plea on the tower a context Harry never had. Snape can only slow the curse down.
Dumbledore asks Snape to become the man Voldemort will trust
Harry Potter and the Deathly Hallows Part 2
Dumbledore states the arrangement plainly: “You must be the one to kill me, Severus.”
He follows it with the purpose: “Only then will the Dark Lord trust you completely.” Snape needs that trust to stay useful inside the enemy’s camp. Killing the headmaster keeps his place there, at the cost of appearing to destroy the man who has relied on him.
The earlier “please” now sounds like a request to keep a terrible promise. Harry’s anger still makes sense, because Dumbledore has chosen to leave him looking at a murder while the explanation sits in the murderer’s memory.
Snape kills Dumbledore because Dumbledore asked him to. The curse is already killing Dumbledore, and he wants Snape to stay trusted inside Voldemort’s circle. Harry pays for the secrecy: he loses Dumbledore and spends the last two films believing Snape murdered him.