Dogs kick their legs, often referred to as "air kicking" or "scratching," as a reflex action that mimics the natural behavior of scratching or digging. This behavior can also be a sign of excitement, playfulness, or even an instinctual response when they feel something on their skin. Additionally, dogs may kick to mark their territory, as they have scent glands in their paws. Overall, it's a normal and instinctive behavior for dogs.