Well, some writers might do it to explore different character dynamics. Maybe they think there are aspects of Harry and Ginny's relationship that were not fully explored in the original books. By having Harry dump Ginny, they can dig deeper into the individual characters' personalities and how they react to a break - up.
Another reason could be to create an alternate storyline. Fans often like to imagine different scenarios for their favorite characters. In this case, writing Harry dumping Ginny can lead to a whole new set of adventures and plotlines for both characters. It allows for creativity and a fresh perspective on the Harry Potter universe.