Severus Snape's actions are driven by a tangled web of motives, not simple retaliation:
Childhood bullying and rivalry for Lily Evans fuel his hostility toward Harry (James's son).
He becomes a double agent, protecting Harry at Dumbledore's request to honor Lily's sacrifice.
He seeks atonement for delivering the prophecy that targeted Lily. He dies to ensure Harry's victory.
His harshness often masks protection; he prepares Harry to defeat Voldemort.
He actively undermines the Dark Lord's return, risking his life daily.
Snape is not merely "fighting back"—he is a tragic figure navigating hatred, love, duty, and penance.