Another possibility is that he is forced to leave. There could be a false accusation against him, like being framed for a serious crime at Hogwarts. The wizarding authorities might then expel him, and he has to leave, which would set off a whole new adventure outside the school walls.
He might leave Hogwarts in fanfic due to a sense of disillusionment. Maybe he discovers some dark secrets about the school or the wizarding world in general that make him question his place there. It could be something related to the way the school is run or a conspiracy among the teachers that he stumbles upon.
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 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.
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.
One possible reason could be that he's tired of the constant danger at Hogwarts. There are always threats like Voldemort's followers or dark creatures lurking around. Another reason might be that he feels pressured by the expectations placed on him as 'the Chosen One'. Everyone expects him to save the day all the time, and it's a huge burden.
One possible reason could be that he's tired of the constant danger and politics in the wizarding world. After all he's been through so much. He might just want a normal, quiet life away from magic.
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 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.
It could also be due to personal reasons related to his growth and self - discovery. The events of the Triwizard Tournament might make him realize that he needs to find his own path outside of Hogwarts for a while. He might feel that the school can't offer him the answers or the experiences he needs at that moment to become stronger and more independent.
One possible reason could be that he wants to break away from the pre - determined path. In fanfic, the author might want to explore an alternative version of Harry who is tired of the constant danger and expectations at Hogwarts. He may feel that staying there will only lead to more battles and losses, so he rejects it to seek a normal life.
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.