Have you ever gone outside with your dog and they sniff the ground for a minute and then just start attacking the ground with their paws? They end up getting dirt and mud everywhere (including all over you) and there doesn't seem to be any reason why! There are actually a couple of good reasons to answer the question "why do dogs dig?" Here are a few:
Depending on the kind of breed you have, your dog may be digging holes in your backyard to hunt for small animals. Yorkshire Terriers and Dachshunds were bred to dig for small animals like gophers and moles.
If you have a burrowing rodent problem, and a short-legged terrier, it might be best to call an expert to get rid of the vermin versus having your dog dig up your yard even more. It might cost a bit, but it just might save your sanity!
Sometimes dogs just dig when they're bored or stressed. If your dog is cooped up in the house all day and only gets to go out before and after you go to work, he might take advantage of the time outside by digging furiously to try to get some of his energy out.
If this schedule sounds familiar to yours, try building some more time for you and your pooch to spend outside. You'll both be happy that he can release some of that energy outside in a less destructive way (and so will your clothes!).
It's part of a dog's natural instinct to want to build a den. Your dog may be completely comfortable in his cage inside or perhaps hiding out underneath the dining room table, but if you like to spend long periods of time with your pup outside (being aware of weather conditions, of course) he may want a place to call his own outside and if you don't have a shelter that's suitable for him, he may resort to making his own - literally. If you find that this is the case with your dog and don't want a large hole in your yard, you may want to invest in an outdoor dog shelter.
If your dog isn't prone to dig, but you notice him tearing into the ground on a hot summer day, it may be to simply beat the heat! The mud a few layers down is going to be a lot cooler than the patch of grass the sun is beating down on - especially if your dog has a fluffy fur coat like a Siberian Husky or a Chow Chow.
In addition, pregnant dogs may dig holes as a nesting instinct, related to the denning example above. Some dogs just can't be contained, either, so you may find that your dog is digging to escape the confines of the yard. If this is the case for you and you're tired of chasing Fido down the street, try a tie out with a long lead or taking your dog out on a leash!