It often deepens their relationship. For example, in many fanfics, a hug from McGonagall can make Harry feel more secure at Hogwarts. It shows him that there are adults he can trust, and it might make him more open to confiding in her in the future.
She might use her magic skills to shield Harry from physical harm. For example, she could cast protective spells like a strong shield charm when Harry is in danger from dark wizards. Also, she may use her authority in Hogwarts to keep him away from those who wish to harm him, like making sure he is not alone in dangerous areas of the school.
One possible reason could be that she is under some sort of dark magic influence. Maybe a spell has been cast on her that makes her act out of character and abandon Harry.
Perhaps when Harry is wrongly accused of something, and McGonagall uses her influence and knowledge to prove his innocence. She stands up for him in front of the whole school or the wizarding authorities, which is a very significant moment of her protecting Harry.
She might give him harsher punishments than other students for the same offenses. For instance, if Harry is late to class, she could give him detention while letting others off with a warning.
It could be that in the fanfic's plot, McGonagall has some past connection to Harry's enemies. So, her hatred towards Harry is a result of her loyalty to those she has a history with. This would create a lot of drama and conflict within the fanfic's story.
Harry might be initially shocked and confused. He has always seen McGonagall as a reliable figure in his life at Hogwarts, so her abandonment would be a huge blow to him.
Another theme might be manipulation. Voldemort could be hugging Harry as part of a devious plan. He might be trying to lull Harry into a false sense of security or gain some sort of advantage over him, like getting closer to the source of his power. It's a way to add a new layer of intrigue to the relationship between the two characters.
One common theme is friendship. The hug often represents a deepening of their bond as friends. It shows that they are there for each other through tough times.
Yes, there are quite a few. You can find them on some popular fanfic websites like Archive of Our Own. Just search for 'Harry Potter hugs Draco' in the search bar and you'll be presented with a variety of stories that explore different scenarios of such an interaction. It could be a moment of reconciliation after a big fight or a simple gesture of friendship in an alternate universe.