I remember when I saw this movie in the theater, and the overwhelming reaction to this scene was negative. People thought it was abrupt, out of place, baiting, and a weird thing for the two characters to do in the middle of a long stretch of, frankly, nothing much happening.
I thought it was a brilliant little scene. This part of the film evoked a long, difficult journey one step away from danger, where everything is tense because at every stop they had to remember to do each charm and to leave no trace. Harry and Hermione didn’t have Ron to keep their spirits up, had probably run out of everything there was to talk about, and kept an uncomfortable silence because, well, what else was there to do?
And when you can’t figure out anything else to do, sometimes weird stuff just happens. When you’re exhausted, or you’ve been up too late, or you are under a lot of stress, or your blood sugar is low, the weirdest stuff seems funny to you. You say words over and over. You trade insults that don’t make sense with your companions. And sometimes, you get up and dance in a weird slow unpremeditated way because you just can’t talk to that person anymore but you need to know that the world is still real, that they are not a figment of your imagination, and you want them to know that you want to be real to them too.
But it’s worth noting that a lot of people haven’t ever been at this point. They haven’t been so stressed and so tired and so overwhelmed that you feel the need to get up and make sure things are still real and you didn’t accidentally fall asleep or something, so they don’t understand why you’d do this.
Con people and theatre people get it, sort of. Military people definitely get it. Some parents might get it, if they’ve been responsible for a child with a prolonged and serious illness. People living in poverty get it. But I think the reason the whole “wandering in the woods” section of the book and the movie was so widely ridiculed and poorly received is that comfortable middle class people for the most part Just Don’t Understand Why.