As interesting a question as this is, I think the only way to be 100% sure is to ask her. I don't Twitter, so I'm not sure how this would work, or how likely it is that an answer would be forthcoming, but anything I, or anyone else says, can only be inference.
But, as we know, in Harry Potter and the Deathly Hallows, there is a truly wonderful reveal where we learn that Severus Snape had loved Lily all along. He does what he does because of his love for her. He carried what he knew of the Prophecy to Voldemort and, because of that, Voldemort went after Lily Potter. Snape has now lost the woman he loved and he feels responsible for it (not unreasonably you might say). So what's he to do? He has nothing left, he wishes he were dead. But what use would that be? All he can do is honour what she died for and, in that way, he can make some small atonement for the part he played in her death.
'Her son lives. He has her eyes, precisely her eyes. You remember the shape and colour of Lily Evans's eyes, I am sure?'
'DON'T!' bellowed Snape. 'Gone ... Dead ...'
'Is this remorse, Severus?'
'I wish ... I wish I were dead ...'
'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.'
Harry Potter and the Deathly Hallows - p.544 - Bloomsbury - Chapter 33, The Prince's Tale
'I thought ... all these years ... that we were protecting him for her. For Lily.'
'I have spied for you, and lied for you, put myself in mortal danger for you. Everything was supposed to be to keep Lily Potter's son safe. Now you tell me you have been raising him like a pig for slaughter -'
'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.
Harry Potter and the Deathly Hallows - pp.551-2 - Bloomsbury - Chapter 33, The Prince's Tale
So I'd say it's abundantly clear why Snape took up the role of double agent. But, you might wonder why he would continue with it, when the grand plan became clear to him. Well, what choice does he have? For one thing, I consider him, to the end, a broken man, with his love gone from the world, by (in his mind) his own hand. I do not believe he has anything much in this world, he has no need to save himself.
But might not he wish to save Lily Potter's son, out of love for her? Well, I don't think so. We know he has no love for Harry whatsoever. He is also surely clever enough to realise that Harry cannot be saved, he is not going to run away and hide, he is going to try and take down Voldemort. Why let the death of Lily Potter's son be as vain as hers, when Snape himself could help make it mean something? He could help make it mean the end of the other person whose hand slew Lily Potter - the hand he could not stay.
Ultimately, he died in the hope of undoing the man who killed Lily Potter. He died an ally of her son. By so doing, he could honour her, he could ensure that her death meant something, he could give Harry Potter a fighting chance of achieving what he must always die for. There is no other way. Neither can live while the other survives.
But he did not die in defence of Muggle-borns generally, he did not die for the triumph of good over evil, he did not die for abstract ideals, he died for personal reasons. He died, having lost his love and been a part of that, to obliterate the one who killed her.
Was he prejudiced to the end, though? Well, no, I don't think he was, and I don't think Jo's quote implies otherwise. Just because his motivation in fighting the fight was personal, rather than defence of Muggle-borns generally, does not make him prejudiced. He was a fairly reformed character, witness:
'Don't be shocked, Severus. How many men and women have you watched die?'
'Lately, only those whom I could not save,' said Snape.
Harry Potter and the Deathly Hallows - p.551 - Bloomsbury - Chapter 33, The Prince's Tale
And now Snape stood again in the Headmaster's study as Phineas Nigellus came hurrying into his portrait.
'Headmaster! They are camping in the Forest of Dean! The Mudblood -'
'Do not use that word!'
'- the Granger girl, then, mentioned the place as she opened her bag and I heard her!'
Harry Potter and the Deathly Hallows - p.553 - Bloomsbury - Chapter 33, The Prince's Tale
Now he has no need to chastise his colleague and, in many ways, his comrade. Why else, but that his own prejudice had waned, would he bother pulling up Phineas Nigellus in a private conversation?
It would be my understanding that Severus Snape has been a Death Eater, he has suffered immensely for that, and he dies hoping to destroy them and, I suppose, make up for the death of Lily Potter - and make it worth something.
But this is personal. It's about his life and his love and the death of someone close to him. It's not like Lily's death made him think: God! If I don't do something about this, there will be a hundred more Lilys! Or: Oh! I understand now how wrong killing Muggle-borns is, I am inflamed by a hatred of prejudice and I will fight for its destruction! It's about him.