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.
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.
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.
In some fanfics, they might abandon Harry because they are under a dark spell. This spell could make them lose their love for him and force them to leave. Another reason could be that they are blackmailed by some powerful dark forces. These forces may threaten their lives if they don't abandon Harry.
One way could be that they appear as ghosts or apparitions. Their presence alone might be enough to spook the Dursleys into releasing Harry. The Dursleys are very much afraid of the supernatural, and seeing Harry's dead parents would surely be a terrifying experience for them.
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 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.
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 Naruto has some sort of power within him that they fear. Maybe it's a power that they don't understand and think could be dangerous, so they hate him out of fear.
Maybe they were under some kind of curse or dark magic that made them fear they would harm Naruto if they were close to him.
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.