It's called the scratch reflex. It is an involuntary reaction. The spot that you are scratching irritates the dog, much like a fly or the wind does and makes the dog flinch. That spot is connected to the spinal cord and sends a message to the legs to kick and get rid of the irritant, similar to a fly swatter.
Much like your own doctor may test your reflexes by hitting your knee with a hammer, a veterinarian can use this spot to check for nerve or neurological issues. With that said, if your dog loves belly rubs, don't stop, keep rubbing!
So what is it, and why do they do it? There are several different possibilities as to what it means, but the a popular possibility is that it appears to be similar to the human shrug or saying "huh?" when you don't quite understand something. It is the dog's way of trying to interpret what it just heard, something they don't quite understand. Another popular idea is that it could be the dog showing curiosity or interest in what is happening.
In some cases, it could be an indicator of a health issue. If you notice your dog doing this often, it could indicate a feeling of dizziness, an vestibular system disorder. More info on that here: Head Tilt Disorientation in Dogs
And finally, we will discuss this last one without the use of visual aids 😁. So why does your dog like to roll around in stinky, rotten, indescribable things, most likely right after you take him out of the bath tub?
The most popular theory is that it appears to be a way for the dog to disguise himself. In the wild, if prey were to smell a dog coming, it would bolt and the dog would go hungry. So the dog tries to hide or mask it's own scent with that of something more familiar/common. Another possibility is that a dog's sense of smell is the most dominant sense. As such, it is a way for the dog to make himself more presentable to other dogs, kinda like a person putting on their fancy clothes and a splash of perfume.
I hope you enjoyed this edition of "Why do dogs do that?". We will do it again soon, and we will add cats to the mix.