It might be that Harry used a new magical object or charm that Hermione didn't recognize, and it seemed to give him an edge in his studies. She might have associated this unknown element with cheating. Also, if Harry's performance in a particular class deviated significantly from his usual standard, Hermione, who knew his capabilities well, would be suspicious and accuse him of cheating.
Perhaps Harry was seen spending a lot of time with a new character, a girl who was really good at magic and Hermione suspected that Harry was getting some sort of unfair help from her in terms of academics. It could also be that there were some rumors going around in Hogwarts about Harry having an unfair advantage, and Hermione, being the stickler for rules and fairness, immediately jumped to the conclusion of cheating.
He could get angry at Hermione for not believing in him. Maybe he would storm off and then later try to prove his innocence by showing her his study methods or the source of his newfound knowledge. He might also feel betrayed since Hermione is one of his closest friends and her accusation is a serious one.
Another reason could be a rift in their friendship caused by outside factors. For instance, if the wizarding community starts to turn against Harry because of false rumors or misinformation, Hermione might find it too difficult to stand by him. She may fear for her own reputation or safety, and this could lead to her abandoning Harry.
In the fanfic, it might be due to some sort of magic gone wrong. There could be a spell that made her act out of character. It's not unheard of in the wizarding world for spells to have unexpected effects on a person's behavior and relationships.
Well, it could be that as time passes in the fanfiction world, Hermione witnesses Harry facing great challenges alone. She might feel guilty for not being by his side and regret her rejection. Also, perhaps she starts to have deeper feelings for Harry that she didn't recognize before, like seeing his bravery in a new light and wishing she hadn't turned him down.
One possible reason could be that she was in love with someone else and couldn't resist the temptation. It could also be that she was under a great deal of stress, and her judgment was clouded. Maybe she thought Harry was taking her for granted and wanted to get back at him in a very wrong way. Or there could be some dark secret in her past that made her act this way.
It could also be due to a series of unlucky events. Suppose Hermione's well - intentioned plans keep backfiring in a way that makes Harry question her judgment. Like when she tries to solve a problem but ends up making it worse, Harry might start to lose trust.
Another reason could be that there are some misunderstandings between them. For example, Hermione might misinterpret Harry's actions or words as being too reckless or irresponsible, and she decides to push him away to avoid being dragged into what she perceives as a bad situation. Also, it could be related to her own insecurities. She might feel that she is holding Harry back in some way or that their friendship is becoming too complicated, so she takes the step of pushing him away to simplify things.
One possible reason could be that she is in a desperate situation. Maybe she needs something for a very important spell or potion to save someone's life and she thinks Harry won't notice or will forgive her. For example, if there is a rare ingredient that only Harry has access to and time is running out.
In fanfiction, it could be part of a developing relationship. If the author is exploring a romantic angle between Harry and Hermione, a touch in class could be a subtle way of showing their growing closeness. It could also be a way to show their strong friendship. For example, they might be working on a group project in class and Harry touches Hermione's hand to pass her a needed ingredient or tool, which shows their seamless cooperation and deep bond.
It could be due to a misunderstanding. Suppose Ron overhears a conversation between Harry and Hermione that he misinterprets completely. He might think they are plotting against him or don't really consider him a true friend. So in a fit of anger and hurt, he decides to betray them.