Do you think the dislike Snape/Harry had for one another (although mostly due to their hostile history and interactions of course) was further reinforced by a slight jealousy of the other's relationship with Albus? An almost sibling rivalry if you will? Albus' seemingly absolute trust for each seemed to annoy the hell out of them both!
Yes, yes, yes - I’m a big believer in this.
Harry’s side is very simple in these circumstances - Dumbledore is the embodiment of all that is wonderful in the wizarding world. He’s powerful, impressive, intelligent - and he seems to really love Harry. For a boy who is utterly starved of emotional affection when he arrives at Hogwarts, to be liked and mentored by a man of Dumbledore’s standing is a heady feeling. It’s no wonder that Harry shows Dumbledore such loyalty when in the Chamber of Secrets, for example.
But the flip side is, Harry despises Snape. He doesn’t simply dislike him - he outright hates him. Snape has unfairly picked on him from the moment that he arrived in his Potions classroom. Throughout the series, even when presented with evidence to the contrary, Harry is convinced that Snape is a terrible man, and it must be a source of constant frustration to him that Dumbledore - wise, intelligent, savvy Dumbledore - has been taken in by a man who Harry is convinced is evil.
Out of all of the characters, Harry’s devastation at Snape’s betrayal is raw. Unlike McGonagall and Slughorn and Hagrid et al, Harry is not devastated at the betrayal, because he didn’t believe that Snape was a good man. Harry is devastated at Dumbledore’s fallibility. Harry is devastated that it was so obvious to him that Snape was a bad man, and almost-perfect-wizard Dumbledore completely missed it.
Snape’s side is a little more complex, and his reaction is probably stronger than Harry’s. We don’t know much about Snape’s time at Hogwarts as a student, but it’s plausible that he didn’t have much of a relationship with Dumbledore; I even think it’s fair to argue that he had a negative perception of Dumbledore, given the werewolf incident, the Gryffindor/Order aligned Marauders, and the fact that he was growing up in Slytherin, a pro-Voldemort environment.
When Snape defects, Dumbledore tells him that he’s disgusted with him - and you can’t imagine that Snape brushes it off that easily. He pledges to be Dumbledore’s spy, and not only stays loyal to Dumbledore for the rest of the war, he then commits to stay true for many more years. He stays at Hogwarts as a teacher, and seemingly becomes respected by his fellow staff members. I think it’s fascinating to think about how Snape changed over those years, and how Dumbledore saw him grow from being the angry youth who aligned himself with the Death Eaters into a young man who his fellow teachers respect and accept as one of them.
I know fandom is rather split on Dumbledore’s attitude towards Snape, but the vital part - to me - is that Snape believes that his word has some sway with Dumbledore, even though we see in Harry’s years that he rarely gets his own way. Snape isn’t shy at speaking his mind, whether in public or in private, and Snape clearly values Dumbledore - we can see this in how quickly Snape leaps to defend him on more than one occasion. It is possible that Dumbledore didn’t have quite the affection for Snape that Snape had for him, but I think it’s important that Snape really does admire Dumbledore.
…and then in walks Harry. Snape clearly antagonises Harry during their first lesson, and then their dislike never abates. Harry sometimes behaves in a way that would be determined, from Snape’s perspective, as being outright malicious and disrespectful, even if the reader knows that wasn’t Harry’s intent.
And I wonder at how hard won Snape’s friendship with Dumbledore was. For a boy who perhaps rarely had contact with the Headmaster during his student years, or who felt utterly maligned by the Headmaster following the Marauders’ antics, it must’ve been somewhat galling to see James Potter’s son seemingly following in his footsteps, getting away with murder and being liked and adored for it. Snape, in comparison, spends years convincing the Headmaster that he’s not a lost cause, and is worthy of his time and praise - and Harry, who Snape sees as being lazy, arrogant and reckless, is immediately the Headmaster’s favourite for no apparent reason.
Fuelling this even more is Snape’s fury at Harry’s apparent failings. There is truth in Snape’s words in Spinner’s End when Snape suggests that Harry has prospered through pure luck and more talented friends; to Snape, who values education, innovation and talent, Harry appears to coast through life without applying himself. He doesn’t study hard, he doesn’t invent spells, he doesn’t research - and I think Snape is left stalking his dungeon and wondering how this useless boy is going to defeat the Dark Lord when Dumbledore…Albus Dumbledore…cannot. I do not think it is a mistake that we witness Snape’s disdain at Harry’s retort at ‘ghosts are transparent’ - it is a key moment in Snape being burdened by the truth that Dumbledore has to die, Snape has to go undercover, and The Chosen One can barely explain the definition of a ghost.
When Snape demands answers of Dumbledore a short time later - when Snape seemingly erupts in a jealous fit in the forest at the end of Half Blood Prince and wants to know what Dumbledore is telling Harry but isn’t telling him - I am certain that Snape is confident that Harry will fail in his quest to defeat the Dark Lord. When that happens, with Dumbledore long dead, Snape needs to know what to do to pick up the pieces and defeat Voldemort in their absence.
Frankly, both of those scenes (Snape’s demand, and Dumbledore’s reveal) are criminally under analysed in fandom.
Interestingly, Snape and Harry go on slightly different journeys at the end of Half Blood Prince. Harry is wrapped up in the idea of Dumbledore being wrong, and Snape betraying him. Snape is wrapped up in the way that Dumbledore treated Harry, and how it was apparently fake. No longer does Snape feel that Harry has usurped his place as the favoured son, but Snape now believes that both he and Harry have been misled and lied to all along - that the affection that Dumbledore showed Harry, that the love that Snape wanted that seemingly Harry got instead was…well, apparently not legitimate.
Of course, the reader later learns that Dumbledore did love Harry, and that Dumbledore’s presentation to Snape was merely a case of keeping Harry safe - of giving Snape enough information so he didn’t desert his duty whilst ensuring that the real truth was kept silent.
But it adds another beautifully complex layer to that final year. There is also a horrible irony that Harry believed that Snape had betrayed Dumbledore, and Snape believed that Dumbledore had betrayed Harry…but the stark truth - that nobody realises until the very final moment - is that the real betrayal was Dumbledore’s betrayal of Snape. Poor Severus indeed.