Why do cats and dogs rub their butts on the floor?

Why do cats and dogs rub their butts on the floor?

Canines and cats are sweet, playful, lovable… and extremely gross. In addition to taking in poop and licking their butts, a person of the most strange factors these pets can do is rub their rumps on the floor.

But why do puppies and cats do this “butt scooting?”