If your dog does this, he/she most likely needs his/her anal glands expressed. Take him/her to a groomer and they will do it before/after doing the rest of the dog grooming. Or, take the doggo to the vet to make sure it's not something more serious. Anal glands are notorious for inflammation and even cancer. It can be painful for the dog, and can also present a risk to their livelihood. I just went through this with my dog. He had a hardened left anal gland that the vet treated and is doing better now. It's still not normal, so it has to be monitored for the rest of his life.