Idea of Starting a Dog Park
The dogs are social beings and they look for a park to refresh their mind. Sometimes to look for human companionship, sometimes to be with other dogs they also dig to escape. Dog digging behavior for escape can also mean that your dog wants to look for a mate. Dogs can also dig for shelter if they are cold, they dig up a pit for warmth; if they are hot, and they dig up the cool, moist earth to lie in.
Digging is also instinctive behavior left over from when dogs still lived in the wild. Sometimes dogs still feel the need to hide leftovers, while they no longer hunt, like bones, for later consumption. There are plenty of reasons for dog digging behavior. Some breeds, like terriers, are more prone to digging than others. For most dogs, however, it's a fun exercise because it's very stimulating, with all the smells, creatures, and treasures they may uncover. Bored and lonely dogs tend to dig for lack of anything to do, or out of separation anxiety.
One good trick is to sprinkle some ground red pepper on the part of your garden you want to protect. You can squirt him with water or turn on the sprinklers when you catch him digging where he's not supposed to. Likewise, you can also use any loud noise, like banging a coffee can to stop your dog digging behavior. Just make sure to do this when you actually catch him in the act.