This right here, explains the whole scene when Harry dances with Hermione. It's actually one scene that wasn't in the book that I absolutely loved in the movie, 'cause it showed how much Harry really cares about Hermione as one of his best friends.
Harry Potter was saved by a mother's love more than once. Harry may not of had his mother but he had a lot of comfort from mother like figures. Whenever Harry needed comfort it was always from a mother figure.