It seems to me that the threat of expulsion is hung over the heads of Hogwarts students pretty frequently during their time at the school. In Philosopher's Stone in particular the students seem constantly terrified that they might be chucked out. Being expelled has extreme consequences, as we see with Hagrid - your wand is snapped and you're consigned to a life on the confines of wizarding society. Even when allowing for Harry and co getting into trouble more often than the average Hogwarts student it seems to be mentioned a lot. Not only do the students themselves worry about being thrown out but the teachers too seem to actively threaten trouble-makers with expulsion on a regular basis.
However, from the examples we have from the books, only Hagrid is actually expelled - and that was for something very severe. (Fred and George arguably were expelled too but I'd argue that they jumped before they were pushed).
Why is expulsion frequently threatened but hardly ever enforced? Are the Hogwarts teachers just being mean and manipulative?
There are plentiful examples below, which I include for completeness's sake.
Examples of students worrying about being expelled:
A horrible thought struck Harry, as horrible thoughts always do when you're very nervous. What if he wasn't chosen at all? What if he just sat there with the hat over his eyes for ages, until Professor McGonagall jerked it off his head and said there had obviously been a mistake and he'd better get back on the train?
(Philosopher's Stone, Chapter 7, The Sorting Hat)Now he'd done it. He hadn't even lasted two weeks. He'd be packing his bags in ten minutes. What would the Dursleys say when he turned up on the doorstep?
(Philosopher's Stone, Chapter 9, The Midnight Duel)There was no reason on earth that Professor McGonagall would accept for their being out of bed and creeping around the school in the dead of night, let alone being up the tallest astronomy tower, which was out-of-bounds except for classes. Add Norbert and the Invisibility Cloak and they might as well be packing their bags already.
(Philosopher's Stone, Chapter 15, The Forbidden Forest)
Example of the Ministry of Magic threatening expulsion:
The severity of this breach of the Decree for the Reasonable Restriction of Underage Socrcery has resulted in your explusion from Hogwarts School of Witchcraft and Wizardry. Ministry representatives will be calling at your place of residence shortly to destroy your wand.
(Order of the Phoenix, Chapter 2, A Peck of Owls)
Examples of the teachers threatening expulsion:
Strict and clever, [Professor McGonagall] gave them a talking-to the moment they had sat down in her first class.
"Transfiguration is some of the most complex and dangerous magic you will learn at Hogwarts," she said. "Anyone messing around in my class will leave and not come back. You have been warned."
(Philosopher's Stone, Chapter 8, The Potion's Master)"None of you is to move while I take this boy to the hospital wing! You leave those brooms where they are or you'll be out of Hogwarts before you can say "Quidditch". Come on, dear."
(Philosopher's Stone, Chapter 9, The Midnight Duel)"Silence!" snapped Snape again. "Most unfortunately, you are not in my house and the decision to expel you does not rest with me. I shall go and fetch the people who do have that happy power. You will wait here."
(Chamber of Secrets, Chapter 5, The Whomping Willow)"I will be writing to both your families tonight. I must also warn you that if you do anything like this again, I will have no choice but to expel you."
(Chamber of Secrets, Chapter 5, The Whomping Willow)"Miss Granger, you are already facing suspension from this school," Snape spat. "You, Potter and Weasley are out-of-bounds, in the company of a convicted murderer and a werewolf."
(Prisoner of Azkaban, Chapter 19, The Servant of Lord Voldemort)Harry had already been called out of the common room to endure fifteen highly unpleasant minutes in the company of Professor McGonagall, who had told him he was lucky not to have been expelled and that she supported whole-heartedly Snape's punishment of detention every Saturday until the end of term.
(Half-Blood Prince, Chapter 24, Sectumsempra)