In some fanfictions, it could be that the author has rewritten Snape's character in a more approachable way. Maybe Snape shows a side of himself that is protective towards Harry, like secretly guiding him in his magic studies without the usual harshness, which makes Harry feel safe.
Well, it could be that the fanfiction author has created a unique backstory. For example, Snape could have saved Hermione's life at some point in the past, and she now has this deep - seated sense of security around him. Also, he might be a source of knowledge for her, and his presence, while initially intimidating, becomes reassuring as she realizes he won't let harm come to her in matters related to magic and the school.
One possibility is that the fanfic changes Snape's backstory to make him more sympathetic. Harry, being empathetic, then feels safe around him. For instance, if Snape's past is shown to be full of hardships that made him act the way he did, Harry might understand and feel safer in his presence.
Perhaps it's because Snape is a complex character in the original story. Fanfictions might explore his character in ways that make Hermione seem protected in those fictional scenarios. For example, some fanfictions could depict Snape using his knowledge and power to shield Hermione from various threats within the magical world they inhabit.
In some fanfictions, it could be because Draco shows a different side of himself. Maybe he protects Harry from other threats secretly. For example, he might use his knowledge of the Slytherin world to keep Harry out of danger.
Percy is very brave. He doesn't hesitate to jump into dangerous situations, and Annabeth knows that he'll protect her. So his courage makes her feel safe.
One reason could be that in this fanfiction, Snape has some hidden kindness towards Harry that he doesn't show in the original story. Maybe he secretly protects Harry from other threats, which makes Harry feel safe around him.
One reason could be that Harry Potter is the main character of the series. His story arc is central, and Snape is often a complex figure in relation to Harry. Writers might be more interested in exploring how Harry's actions and growth impact Snape's character and vice versa. Also, Harry has a broader range of relationships within the wizarding world that can be intertwined with Snape's story in fanfiction.
Perhaps in this fanfiction, Snape has proven himself to Harry in some extraordinary way. Maybe he has saved Harry's life multiple times or has shown his true loyalties that were hidden in the original story. It could also be that Snape has some special connection with Harry that makes Harry trust him unconditionally.
One reason could be that he sees her intelligence and potential. Snape has always had a soft spot for those who are brilliant in potions and magic, and Hermione is top - notch in that regard. He might also recognize her determination and how she's often an outcast among her peers in a way, just like he was. So, he feels a sense of kinship and thus protectiveness towards her.
One possible reason could be that Snape has shown unexpected kindness to Hermione in the fanfiction. Maybe he has protected her from some danger secretly, which makes her feel she can rely on him and thus feel safe.