Dogs often misbehave because they are bored. Our dog doesn't do this anymore but when she was a puppy I would come back from work to find holes in the wall! I spent each lunch break using polyfilla to fill them up! In the end we left her outside during the morning and then she started eating my rose bushes! We built a fence to stop her going to that part of the garden and got some toys and gradually she calmed down and got used to the routine.
There was one dog that we used to live next to and whenever the couple went out the dog would bark continuously until they returned. It drove us mad and in the end the couple never went out at the same time. Maybe it wasn't boredom but anxiety? Other dogs might start digging out of boredom.
If you think your dog might be bored then get some safe toys. You can also get these treat cubes that keep them busy for a while (as long as they are robust!).
Our dog is fine now and lives outside in her kennel quite happily. She comes inside when we are around and during winter. However if we are out and get back later than planned so that she has been on her own for 5 hours she starts licking her front paws. We try never to leave her for longer than 4 hours but sometimes we can't help being late. She gets obsessed with licking and we have to take her out for a walk straight away to stop her doing it. Apparently this is a boredom thing. We tried giving her chews that take ages to eat but she won't eat them unless we are around! We come back to find that they are still there untouched. Fortunately we are lucky to have a great neighbour and if we are late they pop round to see her or take her out so she doesn't often get bored now..