There could be several factors. Firstly, she might have a strong connection to a different magical culture or place that she believes can offer her more than Hogwarts. Secondly, she could be in conflict with the ideology of Hogwarts. For instance, if Hogwarts has a history of discrimination (even if it's not always obvious), she might not want to be part of such an institution. Additionally, she may simply not be interested in the typical Hogwarts education. She might have her own unique approach to magic that doesn't align with what Hogwarts offers, like a more nature - based or spiritual form of magic that Hogwarts doesn't teach.
In some fanfictions, Ginny may reject Harry because she wants to focus on her own personal growth. She might feel that a relationship with Harry at that time would hold her back from achieving her own goals, like becoming a great Quidditch player or an accomplished witch in her own right. So, she decides to reject him to pursue her own dreams first.
One possible reason could be that he was under the influence of a powerful dark magic or a curse that made him lose control. Another reason might be that he was tricked into believing Hogwarts was a threat to the wizarding world in some extreme way. Maybe a powerful enemy manipulated him to think that destroying Hogwarts was the only way to save everyone.
One reason could be to give him a stronger connection to Hogwarts. As the heir, he might have special privileges or knowledge about the school. Another reason is to add a new dimension to his character. It makes him more than just a student who defeated Voldemort.
It could also be that the fanfic might interfere with the way he wants his story to be remembered. His adventures at Hogwarts were real and important to him, and when fanfic changes the narrative, it's like his story is being disrespected. For example, if a fanfic portrays him as cowardly when he was actually brave, that would surely make him dislike it.
One possible reason could be that he felt he had learned enough magic to face his enemies on his own. He might have thought that the traditional Hogwarts education was too slow or not relevant to his specific needs, like dealing with Voldemort. Another reason could be some sort of conflict with the Hogwarts faculty. Maybe he didn't agree with their methods or decisions and decided he was better off without their rules.
One possible reason could be a dark turn in the story. Maybe Harry is under the influence of a dark magic or a powerful and evil entity that makes him lose control and start to destroy Hogwarts. For example, if he was possessed by a powerful dark spirit that wanted to eradicate the symbol of the wizarding world's good, which is Hogwarts.
One possible reason could be that he feels constantly in danger at Hogwarts. With all the dark magic threats and attacks that keep happening, he might think leaving would keep his friends and himself safer. For example, after the Chamber of Secrets incident, he might have considered leaving to protect others from Voldemort's influence.
One possible reason could be misinformation spread by the Ministry of Magic. They might have spread false rumors about Harry being a threat, which influenced the Hogwarts community. For example, if the Daily Prophet printed false stories about Harry's supposed dark magic activities, it could turn some students and staff against him.
One possible reason could be fear. Maybe he's heard some scary rumors about Hogwarts, like the Forbidden Forest being full of dangerous creatures. Another reason might be that he doesn't want to leave his normal life behind. He has friends in the Muggle world and he might be reluctant to give that up for a world full of magic that he doesn't fully understand yet.
Maybe he leaves because of a conflict with the Hogwarts staff. If the new headmaster or some teachers start implementing rules that Harry believes are wrong or unfair, like restrictions on defensive magic classes, he might decide to leave in protest.