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.
Maybe he's tired of the school politics. There are always power struggles among the different houses and some teachers. He could be fed up with the unfair treatment from some, like Snape's constant sniping at him. So he wants to leave and get away from all that drama.
Another reason might be that he misses the Muggle world. He grew up there and has family there. He could be longing for a more normal life away from the magic and all the responsibilities that come with being the Boy Who Lived at Hogwarts.
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'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.
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 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 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.
Well, it could completely disrupt the relationships. For instance, his friendship with Ron and Hermione might be strained as they try to convince him to stay. This is different from the original where they are all united in their Hogwarts experience.
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.
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.
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.
In some fanfictions, it might be because Snape exposed a secret of Harry's that led to his departure.