Perhaps it's out of his sense of duty. He may feel that as a teacher or an elder in the wizarding world, he has a responsibility to protect Harry, regardless of his personal feelings towards him.
There is a chance that Snape has some sort of respect for Harry's parents, especially for Lily. Since he couldn't save Lily, he might feel that protecting Harry is a way to make up for his past failure in protecting Lily. So, when it comes to the werewolf threat, he doesn't hesitate to protect Harry.
It could also be because of some hidden motives. Maybe he knows that Harry is important for the future of the wizarding world. If Harry gets killed by the werewolf, it could lead to some really bad consequences for the wizarding community, so he steps in to protect him.
Well, he might use his magic skills. Maybe he creates some protective spells around Harry to keep the werewolf at bay. For example, a strong shielding charm that can withstand the werewolf's attacks.
In the fanfiction, Snape could protect Harry from Dumbledore by using his skills in potions. For example, he might create a potion that hides Harry's magical signature from Dumbledore's detection. Or he could use his knowledge of the Dark Arts to counter any spells or charms that Dumbledore might use to keep tabs on Harry. Snape is very intelligent and resourceful, so he could find various ways to physically and magically shield Harry from Dumbledore.
In a large number of 'Harry Potter' fanfictions, Snape is indeed shown as protecting students. His character is multi - faceted, and fanfic authors often dig deeper into his psyche. His knowledge of the Dark Arts could be used not just for teaching but also for protecting the students from potential threats. He might be protecting students from the dark wizards, from the dangerous creatures in the Forbidden Forest, or even from the more malevolent intentions of some of the Hogwarts staff. His relationship with the students in fanfiction can be a complex blend of strictness and protection, making for some very interesting storylines.
In some fanfictions, there could be other dark wizards or witches who are allied with Voldemort or have their own reasons for wanting to harm Harry. Snape would have to protect Harry from these various threats as well. For example, some Death Eaters might try to take matters into their own hands and go after Harry without Voldemort's direct orders.
He might use his magic skills to create a protective shield around Hermione when Sirius approaches with a menacing look. For example, he could quickly cast a spell like 'Protego Maxima' to keep her safe.
One reason could be that Snape has his own complex sense of loyalty. He may feel that Dumbledore's plans for Harry are too dangerous or not in Harry's best interest in some ways. He has a long - standing relationship with Harry's mother, Lily, and perhaps through that connection, he wants to safeguard Harry from any harm that might come from Dumbledore's actions or decisions.
Another reason could be psychological. Harry has lost his parents and Snape's cold and often menacing demeanor reminds him of the danger and loss he has faced. This makes him flinch as a sort of self - protection mechanism. In fanfictions, this psychological aspect can be explored in great detail, showing how Harry's past traumas influence his present reactions to Snape.
In some fanfictions, Harry might defend Snape because he comes to understand Snape's complex past. Snape was in love with Harry's mother, Lily, and his actions, though often harsh towards Harry, were sometimes motivated by his love for her and his role as a double agent against Voldemort. Harry, being a character who grows in understanding, could defend Snape once he learns these truths.
Snape terrifies Harry in fanfiction perhaps because of his strict and often cold demeanor. In the original series, Snape was harsh towards Harry, always seemingly looking for reasons to deduct points or give him detention. In fanfiction, this could be exaggerated. His dark appearance, with his long black robes and sallow complexion, also adds to the menacing aura.
Snape could use his position as a double agent to mislead Voldemort about Harry's whereabouts. McGonagall would be more likely to directly defend Harry. She might gather the other teachers and students at Hogwarts to form a united front against Voldemort. Together, they could create a magical shield around Harry, like the one that protected Hogwarts during the battle, using their combined magical power.