The fundamental difference between James and Severus, the real reason Lily ended up with the “arrogant, bullying toe-rag” and not the boy who had been her best friend is that Severus never matures.
There are arguments to be made that he did not get the chance to do so. That he had more pressure on him at Hogwarts than James, and thus was not able to focus on his personality. Maybe. We don’t know what Hogwarts life was really like for either of them. Maybe things would have been different, post-war, if Lily had lived. But I don’t think they would have, because in a way, Lily did live. She was a part of Harry in more than just the eyes, and people who took the chance to know him saw that. Hell, Horace Slughorn saw that. And yet, the man who believed he loved Lily best of all didn’t, because he was too busy using a position of power to continue teenaged rivalries.
The things Snape does to Harry in class, like vanishing his potion before it can be graded, are probably things that the Marauders did to him. It’s rude, unacceptable behavior but ultimately not incredibly harmful. Grades at Hogwarts seem to be determined by end-of-year exams, not in-class assignments, and only OWLs and NEWTs really matter in the job market. GPAs aren’t a thing. It’s unfair, bullying behavior, but it’s the kind of thing that kids with undeveloped senses of empathy do to each other and then regret when they are old enough to understand the effects.*
However, it is not something that a teacher—who is in a position of authority—does to a student to retaliate against the student’s father whom the kid has never met. Particularly when the student would never think to do something like that himself. If Snape had actually gotten to know Harry from the start, he would have seen that in relation to other students, Harry seems to have been much more like Lily than like James.
I imagine that James arrogance probably came from being the only child of wix and from believing himself to be unusually adept. Maybe he picked on Snape because first-year Snape didn’t have the knowledge he thought a pureblood should have—Tobias Snape seems to have not liked magic. Meanwhile, Snape probably insulted James for being a Gryffindor, for befriending Black the Blood-Traitor, or for not being able to tie a tie. Who knows! They were eleven! And (this is speculation!) maybe when Snape got good at potions, he was vocal about that, so James Vanished his work to take him down a notch. It’s hypocritical, and unsupportive, and the mark of a rivalry. But it’s not something you take out on a kid, particular not one who has half of your one-time best friend’s genes.
Harry comes school with less magical knowledge than most muggleborns. He caught on quickly, as one imagines Snape did, but he doesn’t flaunt these accomplishments. He also never interferes with a classmate’s schoolwork. His best friend is muggleborn. He respects classmates who struggle with schoolwork, like Neville. And until sixth-year, when he believes Draco Malfoy is a Death Eater, he rarely, if ever, attacks Malfoy unprovoked, and even more rarely does he do so with anything other than words. For Merlin’s sake, in fifth year he becomes a teacher and proves himself to be far more patient than Snape has ever been. Yes, he is working with people “on his side,” but is Snape ever shown to be a better teacher to Slytherins?
Teenaged Harry is not like his father in the way he relates to other people, to the point that he is shocked and appalled by his father’s behavior in Snape’s Worst Memory, even though he has been abused by Snape for five years, and hears Snape use a slur against Lily. Meanwhile, adult Snape’s treatment of students much more closely resembles James’s treatment of his schoolyard nemesis.
This is a blatant misuse of power. None of these kids have ever done anything to Snape, except maybe smart mouth him. Two of the ones he most antagonizes—Harry and Hermione—are the most like Lily. But in acting like the adult version of a boy whom he hated Snape is perpetuating harmful behavior, and he’s doing so in a position of much more power than James ever held over him. Moreover, he is behaving in a way that would absolutely horrify the woman he loved.
Perhaps you can say that he believes that this is the way to treat people because it is the way he was treated by the man the woman he loved eventually chose to marry, but the thing is James matured. We are told, in canon, that James became a respected, honorable person. Part of the reason Harry is so shocked by teenaged James’s bullying is because most of the people who have told him about his father have spoken of him in near-reverent tones, and these are people like Minerva McGonagall, who does not hold with using magic to bully. I can’t imagine her being okay with the things James and Severus did to each other at school, but she clearly admired James as an adult, as did other people. And I refuse to believe that an adult man who loved Lily Potter—loved her enough to allow her to bring out the best in him—would take out teenaged animosity on a child who had never met the man he disliked.
Really, that’s the thing that bothers me the most about Severus Snape. He loved the ideal of Lily. If he’d loved the woman, he would have seen her in Harry—but not just in his eyes. He would have given the boy a chance—because that’s what Lily did.
In Snape’s Worst Memory, we are shown two fifteen-year-old boys who love Lily Evans. She shuns both of them, one because he mistreats a classmate** and the other because he uses a slur against her.*** They react differently. Snape begs Lily’s forgiveness, but when she explains what he must change, he balks. No doubt he was being threatened by the burgeoning Death Eater movement. We’ve seen how persuasive they must have been even at this time. But we are never given any canonical evidence that Snape made an attempt to break ties. At the time that Andromeda Tonks is marrying a muggleborn—surely losing a significant amount of privilege and alienating people with dark magic—Snape never changes his word choice for Lily. And yes, it’s a matter of changing fundamental beliefs, but we have canonical characters who did so for reasons other than deep, abiding love. And I don’t believe that one should necessarily change to be loved, but if you are seeking acceptance from someone, you should not do things that are hurtful to them. Yes, he risked his life to save her, but not to save the man she loved, or her baby. I cannot imagine that Lily Potter, who died for that baby, would have been grateful for that, nor for the way he eventually treated Harry. I know there are people who think Snape shouldn’t be judged for the way he treats people, because not everyone is nice, but please look at the way he treats the woman he claims to love.
Meanwhile, James. I’m going to acknowledge the point that he may not have ceased bullying Snape, which is a mark against him. However, after Snape’s Worst Memory, he was not picking fights with Lily’s best friend. His curses would be aimed at a person who used slurs against someone James respected, who had connections with people who were becoming more and more dangerous, and who had invented at least one spell that caused slashes to appear all over someone’s body. Still, James did not let things get too dangerous at school. He had ulterior motives for saving Snape’s life, yes, but those motives were to protect his friends—particularly Remus. I think there is a valid parallel to be made between James seeking to keep the world from finding out about Remus’s lycanthrope and Severus siding with Death Eaters against Lily to protect himself. There are privilege differentials—James with more than Severus, Remus with (potentially) less than Lily—but also danger differentials that potentially even it out.
As for Lily, we have no canonical evidence that James continued to pursue her after the scene at the lake. He did “deflate his head a bit.” Maybe he did it to earn Lily’s affection, maybe not, but either way he seems to have outgrown his bullying tendencies, or at least to have learned to channel them. We don’t have as much information about him post-Hogwarts as I’d like, but we know that he and Lily had thrice defied Voldemort. We know that he trusted his friends and would do just about anything for them. And we know that he sacrificed himself so that Lily and Harry could live.
Lily Evans Potter is a Gryffindor. She is courageous. She has been marginalized, she has been threatened, and she has been betrayed by a childhood friend. You cannot tell me that this woman who loved deeply enough to save her child from the darkest wizard in history would have chosen to spend her life with a man who hadn’t learned to be as honorable as humanly possible. I see Lily as someone who understood that humans are fallible, but expected that the people she loved to recognize their mistakes and strive to be better people. Harry is a forgiving person, and although that attribute is ascribed to James, I think it belonged to Lily, too. After all, she came to love a man who had once been a bully, because he changed. I imagine that was hard for her, considering that the boy she had once loved so well never seemed to manage it.
Snape did risk his life, in the end, by going to Dumbledore. He put himself into danger for her. But that marked the extent of his change in behavior. He switched his loyalties, but never his behavior. He pulled a Peter Pettigrew, but on the opposite side. And perhaps Lily would have forgiven him, as Harry did Pettigrew, and even Snape, but I cannot imagine that she ever would have been able to love him again. That, to me, is sad for everyone involved.
*Not to say that kids don’t/shouldn’t understand that others have feelings, but developmentally adolescents are self-centered and don’t always understand that prank victims have the same feelings/emotions they do.
**That’s the simplest way to put it, but I don’t want to argue in James’s favor here. Whatever the history between him and Snape, James is a bully here, and his “prank” borders on abuse.
***Again, simplifying. The slur must have been deeply hurtful to Lily because she considered Snape her best friend.