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.
Another reason could be related to his friends. If his closest friends leave Hogwarts early for some reason, Harry might feel lonely and decide to leave as well to be with them. He has always valued his friendships highly and they have been a big part of his Hogwarts experience.
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.
One possible reason could be that he feels he has fulfilled his purpose there. Maybe he has achieved certain goals related to protecting Harry Potter secretly, and he decides it's time to move on to other things. For example, in some fanfictions, he might leave to explore his own family history or to further his research on the Dark Arts in a more secluded place.
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.
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.
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 fanfiction, one reason could be his desire for a fresh start away from the memories at Hogwarts. Maybe he feels he has done all he can there and wants to explore new magical knowledge elsewhere.
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 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 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.