It could be a plot device used by the author of the fanfiction. The touch might be used to create tension or an emotional moment between Snape and Harry. It could signify a turning point in their relationship, whether it's the start of a more positive understanding or the heightening of an existing conflict. For example, the touch could make Harry feel uncomfortable and lead to a confrontation later, or it could make him realize that Snape has a more complex side than he initially thought.
One possible reason could be Snape's sense of duty to protect Hogwarts students in general. Even though he dislikes Harry, he might put aside personal feelings to ensure the safety of a student in a dangerous tournament like the Triwizard Tournament. Another reason could be Dumbledore's influence. Dumbledore trusts Snape and may have asked him to keep an eye on Harry during this event.
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.
It could initially create more tension. Harry might be suspicious of Snape's motives, especially considering their generally strained relationship. He could start to wonder if Snape is up to something malicious.
In a more dramatic scenario, during a battle at Hogwarts. Snape might find Harry injured and touch him gently to assess his condition. This could be a very poignant moment as Snape, who has always had a difficult relationship with Harry, is now showing a side of concern. It could also lead to a new level of respect between them.
Maybe Snape suspects Harry of being involved in some sort of dangerous activity related to the Dark Arts. Pressing him to the wall could be a way to force Harry to come clean about his actions or any knowledge he might have. It could also be that Snape is acting out of his own insecurities and pent - up emotions towards Harry, which he has been suppressing for a long time.
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 Snape's long - held grudges and resentments. He had a complex past with Harry's father, James Potter. Snape might see too much of James in Harry and be unable to separate the two in his mind, leading to his rejection.
One possible reason could be that fanfiction often takes creative liberties that may distort the complex character of Snape that J.K. Rowling created. Snape has a very intricate backstory and personality in the original series, and fanfiction might simplify or misinterpret it.
One possible reason could be Snape's long - standing dislike for James Potter, Harry's father. Since Draco is from a pure - blood family like Snape himself, and Snape has a certain affinity for the pure - blood traditions and values, he might choose Draco. Also, Draco was in Slytherin, Snape's own house at Hogwarts, and he might have felt a stronger sense of loyalty to his house and its students.
Maybe Harry discovers something about his past, perhaps related to his parents, that only Snape can help with. Snape was closely associated with Harry's parents. He might know some secrets or have some information that could help Harry understand a family mystery or some hidden power within him.