Hermione could be hiding her pregnancy from Snape because she's not sure of his feelings towards her. There may be an ambiguous relationship between them. She might be in love with him, but not sure if he feels the same. And she doesn't want to burden him or make things awkward between them. Or perhaps she suspects that Snape might be involved in something dangerous, and she doesn't want her unborn child to be dragged into it.
One possible reason could be fear. Maybe Hermione is afraid of how Draco will react. Given their history in the wizarding world, with their houses being rivals at Hogwarts and different beliefs, she might think he'll reject her or the baby. Another reason could be to protect the baby. There could be some threats or dangerous situations in the wizarding world that she believes Draco's knowledge of the pregnancy would put the baby at risk. For example, there could be dark forces that target the children of powerful witches and wizards, and she wants to keep the baby's existence a secret to safeguard it.
Maybe she wants to avoid causing unnecessary worry among her friends and comrades. They are often involved in dangerous missions, and if they knew she was pregnant, they might get distracted. Naruto might think it's better to keep it a secret until she figures out how to handle the situation without disrupting their important work.
One possible reason could be that Snape sees Hermione's value as a brilliant student. He might recognize her potential and not want it to be wasted just because of her dad's actions or situation. Maybe he has a sense of justice deep down, despite his often cold exterior.
Often, the plot develops with Hermione constantly being on edge, trying to avoid Snape as much as possible. She might start making excuses to skip classes or meetings where she knows Snape will be present. For example, she could claim to be working on an important research project alone in the library. Meanwhile, she may confide in her close friends like Harry and Ron, but make them swear to keep it a secret.
Maybe Sakura is afraid of the reaction from her friends or family. So she decides to keep her pregnancy a secret at first. She might be worried about how people will judge her, especially if she's in a difficult situation like not being in a stable relationship.
She could be using magic. For example, she might use a concealment charm on herself to hide any physical signs of pregnancy. Hermione is very skilled in magic, so she could easily cast spells that make her look the same as before. She might also avoid situations where she would be in close contact with Draco. By staying away from him as much as possible, she reduces the chances of him noticing any changes in her.
Maybe Snape made a snide comment about Hermione's intelligence or her Muggle - born status. Snape has a rather acerbic tongue, and if he said something derogatory about Hermione's abilities or her heritage, she would surely be furious. After all, Hermione works extremely hard to prove herself in the wizarding world and any attack on her intelligence or background would be a big blow.
One possible reason could be excessive stress. Hermione is known for being a perfectionist, and the pressure to perform well on the OWLS might have gotten to her, causing her to make silly mistakes during the exams.
One possible reason could be a misunderstanding. Maybe Hermione thought Snape was involved in some dark plot against her friends. In the wizarding world, there are often secrets and deceptions, and if she got some false information, it could lead her to take such drastic action.
Well, one possible scenario could be that in the fanfiction world, there are dark wizards or forces targeting Hermione for her knowledge or power. Snape, with his skills and knowledge of the dark arts, could use his magic to shield her from attacks. For example, he could set up protective spells around her when she is studying in the library or traveling around Hogwarts.