Maybe she leaves because of a conflict. It could be with a teacher who doesn't support her unorthodox ways of learning or a fellow student who makes Hogwarts an unpleasant place for her. In fanfiction, there could be a lot of creative interpretations of such conflicts.
One reason could be that she might be on a secret mission. In some fanfictions, she could be trying to find a powerful magical artifact outside the walls of Hogwarts to save the wizarding world from a new dark threat. She might believe that she can't achieve this while staying within the school's confines.
One possible reason could be that she's frustrated with the school's bureaucracy. For example, if she constantly faces obstacles in getting approval for new study groups or advanced classes. Another reason might be a personal quest. Maybe she discovers a hidden mystery outside of Hogwarts that she can't explore while being a student there.
The students would surely miss her. She's a role model for many, especially the younger students who look up to her intelligence and determination. Without her, the study groups and academic competitions might not be as intense or successful.
One possible reason could be for adventure. Hermione is a very curious character. Maybe in the fanfiction, she has heard of some mysterious magical place outside England that she just has to explore. For example, there could be a hidden library full of ancient and powerful spells that is only accessible in a far - off land.
She might have more time to explore the library on her own. Without the distraction of other students at first, she could discover some really rare and powerful magic books. This could give her a head start in her studies and she might even come across some ancient spells that could be useful later in her adventures at Hogwarts.
Hermione could also get some extra study time in the library. With no other students around, she would have access to all the books she wants without any distractions. Maybe she would find some really rare and powerful spells or magical knowledge that would help her throughout her time at Hogwarts.
Maybe the fanfiction portrays some really dark and disturbing events that make Harry feel he can't stay at Hogwarts anymore. For example, if it involves his friends being seriously harmed in the fictional story in a way that he can't bear to be associated with the place where it all seems to be happening.
One reason could be to search for a powerful magical artifact outside of Hogwarts that they believe is crucial for defeating a new dark threat. In fanfiction, they might feel that Hogwarts has become too dangerous or restricted in terms of resources for their mission.
One reason could be her thirst for knowledge. Slytherin was known for his cunning and knowledge of magic. Hermione might be drawn to his intellectual side. Another reason could be a desire to break the traditional house rivalries. By becoming a fan of Slytherin, she could promote unity among the houses.
One possible reason could be a creative plot twist by the fanfic writer. Maybe they want to explore how Harry would grow and develop on his own without Hermione's support. Another reason might be to introduce new and different story arcs that involve separation, like Hermione having to leave for a dangerous mission that she can't involve Harry in.