Another reason could be that Snape suspects Harry of some secret knowledge or activity. In the complex world of fanfiction, there could be hidden plots where Harry is involved in something that Snape is trying to uncover. By fingering Harry in class, he's trying to rattle Harry and get him to reveal something, either through his words or his actions during the class.
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 reason could be Draco's arrogance. If Draco shows too much pride and disrespect in class, Snape, who values discipline, would not tolerate it. For example, if Draco mocks other students' potions attempts, Snape might punish 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.
In some fanfictions, it could be related to Snape's loyalty to Dumbledore. If Snape believes Harry is endangering a secret plan that Dumbledore has set in motion, he might punch Harry to stop him from doing something stupid. For example, if Harry is about to reveal a crucial piece of information to the wrong person.
One reason could be Harry's resemblance to his father. Snape had a long - standing grudge against James Potter, and seeing Harry might trigger those old feelings. In slash fanfiction, this can be exaggerated, with Snape being harsher on Harry because of his connection to James.
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.
In fanfiction, it could be part of a developing relationship. If the author is exploring a romantic angle between Harry and Hermione, a touch in class could be a subtle way of showing their growing closeness. It could also be a way to show their strong friendship. For example, they might be working on a group project in class and Harry touches Hermione's hand to pass her a needed ingredient or tool, which shows their seamless cooperation and deep bond.
One possible reason could be that Harry is afraid of Snape's intimidating presence. Snape has always been strict and rather unfriendly towards Harry in the original series, so in the fanfiction, this fear might be amplified, causing Harry to run. Another reason could be that Harry has stumbled upon something he shouldn't have seen that involves Snape, and he's running to avoid getting caught.