It's also possible that they were forced into it. Some dark wizards might have threatened the safety of other innocents if they didn't leave Harry at the Dursleys. So, they had to make this tough choice to protect more people.
Another reason could be that they had some sort of premonition or prophecy that indicated the Dursleys' place was a crucial part of Harry's future protection. Maybe a seer told them that for Harry to grow into the wizard he needs to be, he has to endure the Dursley experience first.
Another reason could be that Harry in the fanfic has a newfound sense of self - worth. He realizes he doesn't deserve the horrible treatment from the Dursleys and decides to break free. He may have learned about his true heritage in a different way in the fanfic and decides to leave behind the Dursleys, who have always tried to suppress his wizarding identity.
One possible reason could be that Harry discovers some secrets about Dumbledore that make him lose trust. For example, if he finds out about Dumbledore's past mistakes or hidden agendas that he doesn't agree with. Another reason might be that Harry feels he can better protect his friends and fight Voldemort on his own terms, away from Dumbledore's influence and strategies which he may start to question.
One reason could be that he's tired of the constant danger and battles. He might just want a normal, quiet life away from all the magic chaos.
One possible reason could be to explore different parenting styles in the wizarding world. Spanking, although a controversial form of discipline, might be used by some writers to show how Harry's parents could have dealt with difficult situations. Another reason might be for shock value or to create a unique and unexpected story within the familiar Harry Potter setting. It could also be a way for the writer to delve deeper into the characters' personalities and how they might react in a situation that involves discipline.
Maybe they were forced into it by some dark magic or a powerful dark wizard. They could have been blackmailed into betraying Harry to save their own lives or the lives of others they cared about.
Well, some writers might be interested in exploring alternate timelines or universes. In a different reality, they might think that Harry could be influenced by dark forces in such a way that he would do something as horrible as killing his parents. It could also be a form of creative rebellion against the established story. They want to break the rules and see where it takes them. And maybe, for some, it's a way to deal with complex psychological concepts, like how a person can lose their moral compass completely.
In certain fanfic scenarios, Harry's parents may have left behind some enchanted objects. These objects could have special powers. When Harry discovers them, they might activate and create a magical portal or something similar that allows him to leave the Dursleys' place. For instance, a locket that when opened, transports Harry to a safe place where his parents' magic has created a haven for him.
One possible reason could be that in the fanfic, the author might twist the story to make it seem like his parents' actions had unforeseen consequences that affected Harry negatively. For example, their fight against Voldemort led to Harry being an orphan and having to bear a great burden from a young age.
In some fanfics, Naruto might leave Konoha as a child because he feels ostracized. Since he's the jinchuriki of the Nine - Tails, many villagers fear and shun him. He could get tired of the constant cold shoulders and decide to leave in search of a place where he'll be accepted.
One possibility could be that in this fanfiction, Harry's parents are in some sort of magical stasis or hidden away. The Dursleys, perhaps forced by some magical contract or under a spell, reluctantly take Harry in while his parents' situation is being sorted out. This could lead to a very different dynamic than the canon, with Harry constantly longing to find his parents and the Dursleys being more on edge as they have to deal with a magical child while his powerful parents are still in the picture.