Maybe they betrayed Harry's trust. For example, they might have revealed his secrets or lied to him.
It could also be some new characters created specifically for the fanfic. These characters could have had a conflict with Harry over a variety of issues such as magic usage, family secrets, or personal goals, which ultimately led to the loss of his friendship.
In the 'MLP Friendship is Tragic Fanfic', the tragedy could be caused by a change in circumstances. Maybe something in their world changes, like a new threat or a shift in power, and their friendships can't withstand it. Also, hidden secrets among the friends could be a reason. If a secret is revealed that shatters the trust between them, it can lead to a tragic end for their friendship.
One possible reason could be a misunderstanding. Maybe Harry overhears Ron and Hermione having a private conversation where they seem to be critical of him in some way, but they were actually just worried. Another reason might be if Harry starts to pursue a very different path in magic, like dark magic perhaps, and Ron and Hermione can't support or be associated with that. It could also be that a new character comes into their lives who tries to drive a wedge between them by spreading false rumors about each of them to the others.
One reason could be to save him. Maybe Harry is injured during a battle or some sort of magical accident, and Snape, despite their differences, steps in to carry him to safety. For example, if Harry is hit by a dark curse and Snape, with his knowledge of dark magic, knows he needs to get Harry to the infirmary quickly.
Another reason could be that Harry has other priorities in the fanfic. He may be more focused on solving a mystery, helping a friend, or achieving a personal goal that doesn't involve fighting. So, fighting is not on his agenda.
One reason could be that the fanfic distorts the characters he knows well from Gryffindor. For instance, if it changes the personalities of his friends in Gryffindor in a way that doesn't seem right to him.
Maybe in the fanfic, there could be a misunderstanding between them. For example, Ron might have accidentally broken Harry's trust in some way, like revealing a secret of Harry's that he wasn't supposed to.
One reason could be revenge. Bellatrix might want to get back at Harry for causing problems for Voldemort and the Death Eaters. Kissing him could be a form of humiliation. Another reason could be a power play. By kissing Harry, she shows that she can get close to him and has some sort of control over the situation.
Perhaps he has a newfound motivation. Maybe he met a new mentor who inspired him to take his studies more seriously. Or he could have witnessed something that made him realize the importance of knowledge, like seeing someone get defeated because of their lack of understanding of magic.
Maybe Dumbledore discovers some dark secret about Harry's past that he can't handle. It could also be that Dumbledore is trying to protect Harry in a really strange way, by pushing him away from the dangerous wizarding world around Hogwarts.