Perhaps it's part of a mission. There could be a situation where Snape has to carry Harry to a certain location for a magical ritual or to keep him hidden from a powerful enemy. This would add an element of mystery and adventure to the fanfic, as they have to make their way to the destination while avoiding detection.
One reason could be to save him. Maybe Harry is injured during a battle or some sort of magical accident, and Snape, despite their differences, steps in to carry him to safety. For example, if Harry is hit by a dark curse and Snape, with his knowledge of dark magic, knows he needs to get Harry to the infirmary quickly.
It could also be a moment of realization for Snape. He might carry Harry as a sign of finally accepting his role in protecting Harry, similar to how he protected him secretly throughout the series. In a fanfic, this could be a very emotional moment, where Snape realizes that Harry is more important than his grudges.
Maybe in the fanfic, Snape is written as having some hidden, truly evil motives that Harry discovers, leading him to kill Snape. For example, if Snape was secretly working for a new dark force even worse than Voldemort.
Perhaps in fanfic Harry complains about Snape due to Snape's relationship with his father, James. Snape clearly had a lot of animosity towards James, and sometimes that spilled over onto Harry. Harry might feel that Snape is holding a grudge against him for something his father did, which is unfair, and thus complain.
In some fanfics, Snape might punish Harry because of his perceived insolence in class. Harry has a rebellious streak, and Snape, being strict, wouldn't tolerate any behavior that he deems disrespectful to his authority as a teacher.
One possible reason could be Snape's long - standing grudge against James Potter, Harry's father. Since Snape had a difficult past with James, he might project that onto Harry. Another reason could be that Snape is trying to protect Harry in a very strange way. He may think that by rejecting Harry, he is keeping him at a distance from the dangerous wizarding world politics and plots that Snape is often involved in.
One possible reason could be Snape's long - held grudges and resentments. He has a complex history with Harry's father, James Potter. Snape might see too much of James in Harry and be unable to separate the two, thus rejecting Harry despite any potential father - son connection. Another reason could be Snape's own self - loathing and his belief that he is not worthy or fit to be a father figure. He may think that he would only bring harm or a bad influence to Harry's life.
One possible reason could be that Snape is still holding a grudge against James Potter, Harry's father. He might take out his long - standing anger on Harry. Another reason could be that Snape is trying to discipline Harry in his own strict way, but it ends up being too harsh and making Harry cry.
One possible reason could be his lingering resentment towards James Potter, Harry's father. Snape and James had a long - standing feud during their school days. Since Harry looks a lot like James, Snape might be transferring his old grudges onto Harry.
One possible reason could be that Snape shows a different side to Harry in the fanfiction. Maybe he protects Harry secretly from some hidden threats that others are unaware of, which makes Harry start to trust him.
Snape could be distracted by his own dark thoughts or memories. For example, if something reminded him of his past with James Potter, his hatred for Harry's father might cloud his judgment for a moment and cause him to accidentally cast a spell in Harry's direction.
One possible reason could be Snape's personal bias against Harry. Since Harry is James Potter's son, and Snape had a difficult relationship with James in their school days, Snape might unconsciously take out his old grudges on Harry.