Perhaps in this fanfic, Harry has been influenced by dark magic or some evil entity. This external influence could distort his perception of Lily and turn his normal feelings for her into hatred. Dark magic has the power to corrupt one's mind and change relationships in unexpected ways.
In some fanfics, it could be due to a threat she believes she can't protect Harry from. Maybe she thinks that by leaving him, the dark forces won't target him as much.
Maybe some fanfiction authors just like to explore extremely dark and unexpected scenarios. They want to break the traditional image of the characters to create a unique and controversial story.
One reason could be jealousy. Maybe Snape gets jealous of Lily's other relationships or her popularity at Hogwarts. Another could be a fundamental difference in their beliefs or values that grows over time into hatred.
It could be that Harry finds out about Dumbledore's secrets regarding the Deathly Hallows. If Harry thinks Dumbledore was more interested in the Hallows for his own purposes rather than for the greater good, it might make him hate Dumbledore.
One reason could be jealousy. If in the fanfiction Snape is getting more attention or praise from the wizarding world than Lily, she might start to dislike him. Another reason could be that Snape has a different view on blood purity, and Lily strongly disagrees with him, which leads to her hatred.
In some fanfics, it could be due to a conflict over a magical object or a spell. Suppose Lily finds a powerful magical item and wants to use it in a way that Harry thinks is dangerous. This difference in opinion might lead to Harry yelling at her to stop her from doing something reckless.
Another possible theme is self - discovery. As they go through different experiences in the fanfic, they could learn more about who they are and what they want in life. For example, they might discover hidden talents or face their fears and in the process, understand themselves better.
One great fanfic could be 'Harry and Lily's Enchanted Bond'. In this story, Lily, being a fairy, might use her magical fairy abilities to help Harry in his adventures at Hogwarts. It could add a whole new dimension to the wizarding world as we know it.
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.
Maybe in that fanfic, there are misunderstandings between Harry and the Weasleys. For example, they might have had an argument over something like magic use or family values that led Harry to dislike them.