Perhaps he has changed a great deal during his time away, and Hogwarts no longer feels like the home it once was. The familiar halls and routines now seem foreign and alienating, which causes him pain on his return.
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 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.
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.
The fanfiction could use the setting of Hogwarts to highlight his emotions. The once - beloved classrooms and corridors now seem cold and unwelcoming, mirroring his internal turmoil. He might walk through the castle with a heavy heart, his steps slow and his eyes downcast as he battles with the flood of emotions that come with his return.
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.
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.
In some fanfictions, Harry might be expelled for being wrongly accused of using dark magic. Maybe someone framed him by planting dark magic items in his dorm. Another reason could be that he continuously breaks school rules in a way that the school can't tolerate, like sneaking into the Forbidden Forest too many times without permission.
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.