Many canine quirks—such as staring, following, and head-tilting—are perplexing to their human owners. One of the most baffling instances of dog behavior occurs outdoors. Instead of frolicking across a field of grass, some dogs would rather lay down and rub their heads, necks, and backs all over it, making sure they're filthy when it's time to go back inside. But Fido isn't dreaming of ruining your rug when he rolls around in the grass. Rather, he's acting on an instinct that can be traced back to his predatory roots.

According to The Spruce Pets, dogs rub themselves on the ground to mask their natural odor. When dogs' canine ancestors used to hunt, they may have rolled around in the grass before stalking their prey. That way, the herd of deer they were after wouldn't be able to smell them coming. Dog behaviorists believe this instinct is a remnant of the ancient hunting tactic. So, if your dog smells like lawn clippings after writhing on the ground for a few minutes, they accomplished their goal.

While this may explain a specific type of rolling behavior, dogs can have other reasons for getting down in the dirt. Instead of masking their smell, they may want to impart their scent onto the ground as a way of marking their territory. Rolling around in the grass also feels good. If dogs have an itch they can't scratch—or a clump of dirt or loose fur they want to shed—rubbing their back against the ground can provide relief.

This behavior is usually harmless, but there are some instances where it may be cause for concern. If your dog seems desperate to scratch an itch, they may be suffering from allergies that cause dry, itchy skin. Check their body for other symptoms like hives or swelling and see if they continue to scratch themselves on objects indoors. Rolling in the grass can become an obsession, too. Like humans, dogs can have obsessive compulsive tendencies, and these should be redirected with proper training.

Even if your dog likes to roll around for healthy reasons, you may not be thrilled about them carrying the great outdoors into your home. Next time you notice them getting ready to do it, get their attention. Reward them for being outside without rubbing themselves on the grass to reinforce the desired behavior.

[h/t The Spruce Pets]