In a fanfic, it could be for comedic purposes as well. The idea of Sasuke trying to act like Sakura while tricking Naruto can lead to some really funny situations. Maybe Sasuke is forced into this by some strange situation or magic. And he has to keep up the act of being Sakura, which includes mimicking her mannerisms and speech patterns, all while trying to fool Naruto. This could create a lot of humorous misunderstandings and interactions within the story.
Another ending could be that the trick goes on for a long time. Naruto gets really hurt and starts to distance himself from both Sasuke and Sakura. Sakura, on the other hand, finally realizes what Sasuke is doing and she decides to leave Sasuke. In the end, Sasuke is left alone, regretting his actions, and Naruto has to heal from the emotional damage on his own.
One possible reason could be that Sakura has finally grown tired of Sasuke's aloof and cold behavior towards her. She might have realized that she has been constantly chasing after him while getting little in return, so she decides to ignore him as a form of self - preservation.
Some fanfic authors might write it as a form of wish - fulfillment. They might prefer the Naruto - Sakura relationship more than the Sasuke - Sakura one. So, they create a scenario where Sakura turns to Naruto in a romantic way. Additionally, it could be a way to explore the characters' personalities further. For example, how Sasuke would handle being betrayed and how Naruto would deal with being involved in such a situation. It gives a chance to dig deeper into their emotional and moral aspects.
In such a fanfic, one possible reason could be Naruto's feeling of being left out. Maybe he sees Sakura's constant focus on Sasuke and feels neglected in their friendship triangle. Another reason might be jealousy. If Naruto has unrequited feelings for Sakura, seeing her love for Sasuke could turn to hatred over time.
In the fanfic, it could be that Sasuke doesn't appreciate Sakura enough. She might pour out her love and support for him, but he doesn't return it in the way she hoped. Sakura may have expected a more reciprocal relationship where her feelings are acknowledged and valued. Since that's not the case, she starts to regret her choice of Sasuke.
It could be because of a dark power corrupting Sasuke. Maybe an ancient evil force takes over him and makes him see Sakura as an enemy. In some fanfics, this kind of external influence can completely change a character's actions. Also, it might be related to Sasuke's pursuit of power. If he believes Sakura is standing in the way of his ultimate power - seeking goal, he could be driven to kill her.
One possible reason could be Sasuke's focus on his revenge. His thirst for vengeance against Itachi might make him blind to Sakura's feelings and neglect her as he is constantly preoccupied with getting stronger to achieve his goal of revenge.
Maybe to explore different character arcs. The writer might want to see how Sakura would develop as a character if she strayed from her loyalty to Sasuke. It could also be a way to introduce new characters or relationships into the Naruto fanfic world.
One possible reason could be extreme jealousy. Sakura might be so blindly in love with Sasuke that she sees Naruto as a threat to Sasuke's attention or her relationship with Sasuke. Maybe she thinks Naruto is getting in the way of Sasuke's return to the village or her attempts to win Sasuke back.
One reason could be to create shock value. By having two main characters kill another important character, it grabs the reader's attention. Another could be to explore a very dark and alternate version of the Naruto universe. Maybe the writer wants to show how far characters could be pushed in extreme situations.