This is a classic Bully Cycle case, exacerbated by those very circumstances.
Albus Dumbledore took this once-bullied-child and stuck him in a teaching position in the exact same environment where much of his abuse took place, with basically no training on how to be a teacher, how to decently exercise authority, how to healthily handle conflict, how to even be an adult among children. All he had going for him was his experience of teachers from back when he was a child, and given how much James Potter got away with doing to him, I can guess how they appeared to him as a child.
His examples were the same teachers who’d let the Marauders bully him, the same supposedly-caring adults who didn’t care enough to see to his welfare.
Do you suppose he became the teacher he saw them being?
From the eyes of a child whose teachers take his tormentors’ side and never consider it enough of a problem to stop it?
His students, meanwhile—I’m not certain of the timeline, how many years went by between his graduation and his hiring, but it’s quite likely his first older students were people who went to school with him. It’s entirely possible that his sixth or seventh years saw him get dangled upside down and stripped naked when they were first and second years. The only difference was his new position—he’s the teacher now. He hasn’t gained maturity or self-esteem, rather, he’s just been thoroughly shattered.
In fact, that’s something that stuck out to me from the get-go: he’s not interacting with Harry and the other Gryffindors like a teacher or an adult, he’s interacting with them like a fellow student—just one who happens to have teacher responsibilities and teacher authority. He marks Harry Potter as his equal—a rival. An insubordinate subordinate, yes—but a rival in the ways that it matters. A threat.
He has the responsibilities and the position of an adult, but he’s not equipped to be an adult, he doesn’t have the reserves of self-confidence or serenity or wisdom that most adults would have as a goddamn prerequisite to ascending to that position. When he interacts with Harry Potter, he sees James, James who was always only ever as old as he is, as strong as he is, as skilled as he is. In his mind, he’s still fighting against an equal opponent, and the fact that he’s an adult interacting with a child takes second fiddle to the weight of familiarity, the dynamic that has never left him.
You don’t pull punches when you fight with an equal. You do when you fight with someone smaller, younger, less skilled. In his mind, he’s still kicking up, and nobody has given him the skills he would need to recognize otherwise.
And even if he had? He’s never experienced anything but a life written in antagonisms. His home life? Adversarial. His school life? Torment from other students. His teachers? Likely a one-sided resentment from him that they always favored James Potter. Even Lily came with Petunia half the time, and sided with her sister when Severus tried to drive her off. The Slytherins, and later the Death Eaters? Us versus them. Kill the enemy. We are under attack. The strong destroy the weak and that’s not wrong, that’s life.
All of it adversarial and cruel, with a sort of tribalism where Severus was rarely if ever a valued ally wanted for his own sake. All of it marked with contempt and disdain, bullying and abuse, apathy at best and cruelty at worst.
The way he treats his students, his bullying, his threats, his verbal abuse, his cruelty, his overblown reactions to insubordination?
He thinks that’s how the world is.
He thinks that’s the way things are.
He’s never been let into a position to see anything else.
And Albus Dumbledore, whose job it is to protect everyone involved, not only the students in his care (past and present) but also the much-damaged young man who’s come into his sphere of influence and whom he’s placed in a position of heavy responsibility, has troubled very little to show him that anything else.
No standards of behavior, no proper better examples, no directives, no context, no mentorship, no arrangement of observation and feedback, no opportunities for reflection. As if being a teacher was something Dumbledore found as easy and intuitive as Harry Potter found flying, and he had no idea it wouldn’t be the same for anyone else.
Harry Potter, and Voldemort, and Severus Snape, were all three raised knowing neglect and cruelty: one who rejected it utterly, who took every hurt as a reason to be kind instead; one who took those lessons and learned and rejoiced in every way he could take it further; and one who did as was demonstrated to him, time after time, because the only person who was ever any different was first a fluke, and then gone.
(It was never Lily’s responsibility to teach him that a better way existed, or to hold him to it, or to stay with him and make him change, or try to; it was Dumbledore’s responsibility, both when Severus was a student and when Severus was a teacher.)
And Severus Snape, having suffered at every turn all his life, even—especially—from himself (Lily, fifth year; Lily, hunted after the prophecy; Lily, dead in front of her baby), when considering how to treat these children in his care, perhaps wonders what they are that he isn’t, that Dumbledore or anyone else would expect him to treat anyone better than Hogwarts has treated him.
It is absolutely his responsibility, every damaging thing he said or did, and everything that could have done damage but didn’t solely due to the resiliency of its recipient. With power comes responsibility, united, indivisible.
That said …
Perhaps he is treating them like himself.
Perhaps he is what you sometimes get when it takes a village to fuck up a child.