Porque não foi culpa do Dumbledore, e porque ele ainda amava a Lily e queria fazer isso em sua memória.
Ninguém esperava a traição de Pettigrew. Lembre-se que foi Lily e James quem fez Peter the Keeper alguns dias antes do ataque. Dumbledore provavelmente não sabia disso, e mesmo se o fizesse, parecia uma escolha razoável no momento.
Por que ele continuou trabalhando para Dumbledore, este é o momento em que Dumbledore pede a Snape para ajudá-lo a proteger Harry:
“And what use would that be to anyone?” said Dumbledore coldly. “If you loved Lily Evans, if you truly loved her, then your way forward is clear.”
Snape seemed to peer through a haze of pain, and Dumbledore’s words appeared to take a long time to reach him.
“What — what do you mean?”
“You know how and why she died. Make sure it was not in vain. Help me protect Lily’s son.”
“He does not need protection. The Dark Lord has gone —”
“The Dark Lord will return, and Harry Potter will be in terrible danger when he does.”
There was a long pause, and slowly Snape regained control of himself, mastered his own breathing. At last he said, “Very well. Very well. But never — never tell, Dumbledore! This must be between us! Swear it! I cannot bear . . . especially Potter’s son . . . I want your word!”
Harry Potter and the Deathly Hallows, chapter 33 "The Prince's Tale"; emphasis mine.
Então Dumbledore ofereceu Snape para preservar o legado de Lily, já que Snape viu Harry como o filho de Lily. Não de James, mas de Lily; uma maneira de honrá-la e uma maneira de ele se lembrar dela, mantendo um pedaço dela por perto. Lembre-se desta cena icônica de tearjerker:
“But this is touching, Severus,” said Dumbledore seriously. “Have you grown to care for the boy, after all?”
“For him?” shouted Snape. “Expecto Patronum!”
From the tip of his wand burst the silver doe: She landed on the office floor, bounded once across the office, and soared out of the window. Dumbledore watched her fly away, and as her silvery glow faded he turned back to Snape, and his eyes were full of tears.
“After all this time?”
“Always,” said Snape.
Ibid; emphasis mine.
Nos filmes, Dumbledore diz ainda: "Se você realmente a amou ...", o que parece fazer Snape ficar ao seu lado (começa às 2:43):