Sometimes, fanfiction writers like to experiment with different emotions and relationships. They might think that having Harry not like Ginny will add an unexpected twist to the story. It could also be a way to show how complex relationships can be, even in a fictional world based on the Harry Potter series.
One reason could be that the fanfiction is set in a different universe where the characters' personalities are slightly altered. So, this 'new' Harry just doesn't click with Ginny in that version. For instance, if the fanfic is a darker take on the story, Harry might be more jaded and not open to a relationship with Ginny.
One reason could be the alteration of McGonagall's personality. If in fanfiction she is made to be overly strict or mean, Harry, who knows her real character, would dislike this new version. In the original series, McGonagall was strict but fair, and any deviation from that in fanfiction might be off - putting to Harry.
One reason could be a change in Dumbledore's personality. If he's depicted as being cold or distant in fanfiction, Harry, who knew him as a mentor figure, might not like it.
One possible reason could be miscommunication. Maybe Ginny feels neglected by Harry because he's so caught up in his own heroic deeds and doesn't pay enough attention to her. So she might seek comfort or excitement elsewhere.
In some fanfictions, Ginny may reject Harry because she wants to focus on her own personal growth. She might feel that a relationship with Harry at that time would hold her back from achieving her own goals, like becoming a great Quidditch player or an accomplished witch in her own right. So, she decides to reject him to pursue her own dreams first.
The fanfic might be set in an alternate universe where Ron has a different personality. If this new personality clashes with Harry's values or his own personality, then Harry may not like Ron. For example, if Ron is made to be more self - centered in this fanfic, Harry might find it hard to get along with him.
One possible reason could be a growing apart due to their different career paths. Harry, being deeply involved in the wizarding world's security and Ginny having her own Quidditch career. Another reason might be the stress of living in the public eye. Their relationship may not be able to withstand the constant scrutiny and pressure from the wizarding community.
One possible reason could be a misunderstanding. Maybe Harry was wrongly accused of something, and Ginny's temper got the better of her. For example, if there were false rumors about Harry being unfaithful in the fanfiction world.
In some fanfictions, Ginny might be written to betray Harry because of a prophecy. The prophecy could mislead her into thinking that Harry was going to bring doom, and so she decides to act against him to prevent that. It's a different way of looking at their relationship compared to the original story, where their bond was based on love and trust.
Another reason might be some kind of external influence, like a powerful dark magic that clouds Harry's judgment. However, this is often a stretch from the original concept of the characters. Fanfiction writers sometimes like to explore extreme scenarios to add drama to the story.
It could also be an exploration of a dark 'what - if' scenario. Maybe the writer wants to see how the story would unfold if Ginny had a sudden and drastic change in character. Another possibility is that it's a form of creative rebellion against the typical, positive portrayal of their relationship in the original series.