The REAL reason Snape defected
I know the fandom has mixed opinions about why Snape worked against the death eaters and the two most common ones are-
He was horny for Lily (courtesy of the snaters, ofcourse)
He realised his mistake and muggleborn bias after Lily had died as a result of his actions, or so he thought (the rest of the fandom)
We understand that's Snape's morals are rather messy, and it's unreasonable that he'd change them as soon as Lily got targeted. It's irrational because he already knew she was a muggleborn and that's who the DEs targeted most often. It's crazy Severus would've changed sides for revenge. (Because who was he kidding? He held himself partly responsible for Lily's death, and to take revenge from the people he knows were working for the cause he had participated in is insanity, and Snape was a bright man.)
We know Dumbledore's morals aren't exactly white either, but to cite one of his more famous sayings: "Do not pity the dead, pity the living, and most of all, those who live without love"
After Lily had died and Severus had felt the pain of her loss, pain like she couldn't ever feel again as he was the one she left behind, maybe Snape understood the meaning of that saying. Lily was gone but he was here, and he was hurting. What if Snape realised the Death Eaters were the ones causing that?
Not just to him, but to thousands.
What if he realised he could watch people being killed, but not the ones who lived on?
The ones who lived without love.
Like he was going to do the rest of his life.
And sought to change that. He wasn't going to stand by and leave people mourning for someone who had been taken away from them. He was going to actively oppose them from the light side, (which he wasn't a fan of) where they lived and let live.