Perhaps in the fanfic, Obito has some sort of power or knowledge that is too dangerous to be left in his hands. Konan, seeing the threat he poses, decides to kill him to prevent any further harm that could be caused by Obito's existence.
It might be for the greater good. If Obito's actions in the fanfic are leading to destruction on a large scale, Konan, being a protector of sorts, decides to take him out to save the world or at least her part of it.
In some fanfictions, Konan might use her origami techniques in a highly lethal way. Maybe she creates a large number of explosive paper bombs and traps Obito in a confined space, detonating them all at once to overpower his defenses and kill him.
One reason could be to add a romantic or sexual tension element. Since they are both important characters in the Naruto universe related to the Akatsuki, exploring a relationship between them in a more intimate way can make the story more interesting for some readers.
It could be because of a dark curse. Suppose Naruto was cursed by an ancient evil. This curse slowly ate away at his sanity and made him view his friends in Team 7 as threats. As the curse took over more and more, he finally reached a point where he killed them. However, this would require a lot of backstory and character development in the fanfiction to make it somewhat believable.
One reason could be Sasuke's thirst for power. If he believes Naruto is the only obstacle in his path to ultimate power, he might be driven to kill him. In some fanfictions, Sasuke may be influenced by a dark entity that twists his mind into thinking Naruto is a threat that needs to be eliminated.
One possible reason could be that Obito sees Naruto as a means to fulfill his own twisted ideals. Maybe he wants to shape Naruto into a weapon against the Hidden Leaf. Another reason might be that he feels some sort of connection to Naruto because of their shared experiences of being alone and ostracized in the past. He could also think that by taking Naruto as a baby, he can prevent Naruto from becoming the hero the village wants him to be, thus disrupting the balance in the ninja world.
Maybe in a fanfiction where Kakashi is mind - controlled. It could lead him to harm Naruto without his normal self - control.
Maybe the friend betrayed the village in a really bad way. In the Naruto universe, loyalty to the village is important. If the friend joined the enemy and was causing great harm, Naruto could see killing them as a last resort. For instance, if they were about to give away crucial secrets that would lead to the destruction of the village.
Well, Naruto has a lot of unique abilities. He could enter Sage Mode and use his enhanced perception to outmaneuver Obito. Konan, on the other hand, is a very skilled fighter herself. But against Obito's Sharingan and his space - time ninjutsu, she might be at a disadvantage. Naruto could use his talk - no - jutsu to make Obito realize the error of his ways and stop attacking Konan. This would be a very Naruto - like way to end the confrontation.
One possible reason could be to gain more power. Maybe he thought that emotions were holding him back from reaching his full potential as a ninja. He might have seen other powerful ninjas who seemed to be emotionless and thought that was the way to go.
One possible reason could be that Naruto's ideology of peace and friendship influenced her deeply. Naruto has a way of seeing the good in people, and Konan might have started to believe in his vision more than the Akatsuki's goals of chaos and destruction.