Well, perhaps in the fanfiction the Hogwarts staff might have been unfair in grading his exams. Like giving him lower marks than he deserved just because they had some sort of prejudice against him. It could also be that they wrongly accused him of something he didn't do, like misbehaving or cheating. Another reason could be that they failed to protect him or his friends from some sort of danger at Hogwarts.
In some fanfictions, there could be a change in the Hogwarts admission policy. Maybe they found some supposed flaw in Harry's magical abilities or his background that led to his admission being revoked at the last minute, so he didn't arrive at Hogwarts. Also, it's possible that some other powerful magic was at work. A powerful wizard or witch could have cast a spell on Harry that made him forget about Hogwarts or made it so that he couldn't physically reach the school.
One reason could be that he doesn't like others taking creative liberties with his story. He might feel that it's his story and only the original version should be the 'true' one.
Well, perhaps in the fanfiction, the Order made decisions without consulting Harry. They might have put him in a dangerous situation without his knowledge, like sending him on a mission that seemed suicidal. It could also be that they were keeping secrets from him that he felt were important to his fight against Voldemort.
In fanfiction, Harry Potter might be angry if his friends are in danger and no one seems to be taking it seriously. He's very protective of his friends, like Ron and Hermione. So if some authority figures in the story are being dismissive of the threats his friends face, that would surely make him angry.
Perhaps the wizarding government or authorities were being unjust. For example, if they wrongly accused Harry of a crime he didn't commit, his sense of justice would be outraged. His anger would drive him to fight back and prove his innocence. He's not the type to let false accusations stand.
One reason could be that he's being hidden by some powerful magic from a group that wants to use him for dark purposes. Maybe there are dark wizards who know of his future importance and want to either kill or control him, so a good wizard has made him disappear.
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 reason could be that he has fallen in love with someone outside of Hogwarts and wants to stay with that person instead. He may feel that Hogwarts will keep him away from his beloved.
In fanfiction, the author might want to explore a different side of Harry. He could be berating Hogwarts education because he realizes that some students were left behind. There were students like Neville who didn't really shine until later, and Harry might think that the school system should have been more inclusive and better at nurturing all types of magic abilities from the start.