Perhaps in the fanfiction, there is a plot twist where Sakura has been brainwashed by an antagonist. The antagonist could be using her to get to Naruto, knowing their close relationship. So, she would then be made to attack Naruto without her own will. Or, there could be a prophecy or some sort of pre - determined fate in the fanfiction's plot that causes Sakura to hurt Naruto, even if she doesn't really want to.
It could be due to Sakura's feelings for Sasuke. If she's overly focused on Sasuke and Naruto gets in the way of her plans regarding Sasuke in some way, she might lash out and hurt Naruto without really meaning to cause serious harm.
One possible reason could be a misunderstanding. Maybe Naruto was misidentified as a threat in a tense situation. For example, if there was some sort of dark jutsu at play that clouded Kurenai's judgment and made Naruto seem like an enemy. Another reason might be that Kurenai was under some sort of mind - control. There are many villains in the Naruto universe who are capable of such things. If she was being controlled, she might unknowingly attack Naruto.
One possible reason could be a misunderstanding. Maybe she was misled by false information about Naruto being a threat to the village. Another reason might be that she was under some kind of mind control. In some fanfictions, dark magic or evil entities can take over a character's mind and make them act out of character.
One reason is that some fanfiction authors may lack a deep understanding of Naruto's character. They might write things that are completely contrary to his values and personality just for the sake of creating a 'unique' story. For example, Naruto is known for his positive attitude and strong will, but in some fanfictions, he could be depicted as a negative or spineless character.
One possible reason could be a misunderstanding. Maybe Sakura misinterprets Naruto's actions or words, thinking he has betrayed her or their friends in some way, which leads to her hurting him one last time in a fit of anger.
One reason could be that Naruto has always been more attracted to those who understand his outcast past better. Sakura doesn't really have that kind of connection with him as she comes from a more normal background. So there's a lack of that fundamental understanding between them which hinders any romantic feelings.
One common reason is miscommunication. If Sakura misunderstands Naruto's intentions, she might react harshly and physically harm him. For instance, if Naruto tries to keep a secret from her to protect her, but she misinterprets it as betrayal.
In some fanfictions, it could be due to unrequited love. If Naruto has deep feelings for Sakura but she continuously rejects him in a cruel or thoughtless way, Naruto might feel angry enough to seek revenge. For example, she could publicly humiliate him for his feelings, which would hurt Naruto deeply and lead to thoughts of revenge. Another reason could be a misunderstanding. Suppose Sakura is misjudged by Naruto as having done something terrible when in fact she was innocent. But Naruto, in his ignorance, decides to take revenge. This can create a lot of drama and conflict in the fanfiction.
One reason could be jealousy. If in the fanfic, Sakura gets closer to someone else Naruto cares about, like Sasuke in a different way than he expected, it might make him hate her. For example, if Sakura teams up with Sasuke against Naruto's wishes in the fan - created plot.
One possible reason could be the stress from her ninja life. Constant battles, the pressure to protect the village, and the fear of losing her loved ones can take a toll on her mental health. Another reason might be her relationship issues, especially her unrequited love for Sasuke which has been a long - standing source of emotional turmoil for her.