Many dogs have a natural instinct to bury bones. This is a way for them to store food for later, and it can also be a way to mark their territory.
Dogs can sweat through their paws. When a dog digs, it exposes cooler soil to the air, which can help the dog to regulate its temperature.
This is especially common in dogs that have a history of scavenging. If a dog has learned that it can find food by digging, it will continue to do so.
Dogs have scent glands in their paws, and when they dig, they release these scents into the soil. This helps them to mark their territory.
If a dog is bored or anxious, it may start to dig. This is a way for the dog to relieve stress and to expend energy.
If a dog is confined to a small space, it may start to dig in an attempt to escape. This is especially common in dogs that are kept in backyards or in kennels.
Some dogs dig to find a comfortable spot to lie down. This is especially common in dogs that live in hot climates.