Dogs kick to spread their scent and mark their territory after pooping.
The kicking motion mimics burying poop as dogs would do in the wild.
Kicking may be an instinct to clean their paws and cover their business.
Some dogs scratch and kick out of joy and relief after pooping.
Joy and Relief
Kicking can express anal glands or relieve discomfort from full anal glands.
Kicking can become a habit. Use positive reinforcement not to reward the behavior.
See the vet if frequent scooting or licking occurs along with kicking.