Dogs dig holes in the soil to seek comfort and protection. In hot weather, they like to lie in cool soil. During rain or stormy weather, they seek shelter in these holes. Sometimes they dig holes out of curiosity or just for entertainment. When left on their own, they may feel bored and start exploring the soil to occupy themselves.