Thanks for your question. It's always best to consult your vet if you're worried about your dog as there are a number of reasons it may be eating dirt.
It could be craving something that's lacking in its diet. Check that the food you're providing your pooch is well-balanced and good quality.
Another reason could be that it can smell a food source in the grass or just beneath the ground in which case it's probably not taking in a lot of dirt.
Or if your dog has an upset stomach it might eat dirt as a way of diluting the item that's causing it to feel bad. Remember to see your vet if it continues to be a concern.Thanks,
Team Bondi Vet