What kept Snape going through all those long years as a spy? The novels say he wasn’t a man bound by a sense of duty—so was it guilt, then? A sense of responsibility? The pride of being the only one who could do it? A life of just enduring one day at a time? Snape is such a complicated person 😮💨
you have asked what i want to say is the central question of snape's character: why -- or how -- could he do what he did? in effect, if we can answer this question, we gain the ability to understand everything about him!
i remember that when deathly hallows was published and the truth of snape's allegiance came out, i thought it was baffling and -- honestly -- absurd. "that makes no sense!" i seem to remember saying to myself. but later, i came to feel that it was compelling precisely because it made no sense. once we accept it as the "truth" of snape's character, we have to try and explain this part of him: this thing that defines him but which seems to defy rational explanation.
what would make a person protect someone he hated in the memory of someone he'd loved but had no good relationship with in the end? that's perhaps an overly simplified framing, but it's also undeniable that snape hated harry and that he carried his love for lily until he died.
however, based on our understanding of human nature, can we say that someone could do everything snape did for the sake of someone else, even out of love? could he do it from feelings of guilt or responsibility? could someone remain guilty all that time, and be driven to those lengths purely by remorse?
i think the truth has to be that in the deepest, most profound way, even if he was unaware or didn't acknowledge it, snape did it all for himself. this isn't about selfishness; it's the core, i think, of how people work: some things have inexpressible value to us, and to touch the essence of them in our lives is to be fulfilled. something about turning against voldemort, about spying on him, about his role in the war, about protecting harry even at great personal cost, about continuing to love lily, must have given snape a sense of purpose and fulfillment that let him remain steadfast in spite of great personal risk and estrangement. we can't say he was a joyous or even a contented person -- i think it's clear that he was deeply unhappy, miserable, and bitter, perhaps even joyless. but fulfillment doesn't have to be joyous. it just has to give your life meaning.
i agree that snape wasn't dutiful. i see "doing one's duty" as adhering to a framework imposed by others -- family or society, for example -- such as professing loyalty to a cause or swearing allegiance to a person because these things are expected of you (because of your place in society, for example). snape isn't like that at all -- which is also why we can discount a sense of responsibility, which is the twin, or cousin, of duty. i'd argue that snape's moral framework was self-assembled (and mutable, and contradictory) and his allegiance was always completely personal. he did things because he wanted to do them. when he joined up with voldemort, it's because he wanted to, and when he switched sides, that's also because he wanted to. he protects harry and spies on voldemort because he wants to, not because he could be bribed, coerced, threatened, swayed, or inspired. but he doesn't want it for the usual reasons, i.e. believing in harry or possessing the same sense of justice as dumbledore's crowd. there was absolutely nothing in it for him in the traditional sense, which means the deciding factor had to come from within, and it had to be enough to reshape his entire life.
so essentially, i didn't answer your question, because i can't purely answer it for myself :3
he's very complicated, you're right! even after so many years, i still find new things about him to ponder over.