It's difficult to say really, as there can be different causes of coprophagia (the technical term for eating faeces).
- being a learned behavior. It's common for female dogs with puppies to eat both their own poop as well as that of the puppies out of instinct, in order to keep the nest clean. In some cases with female dogs, the behavior can continue after the puppies have all moved on. If a dog has grown up around other dogs who have eaten poop, this is also how they can learn it.
- if they're being fed a poor quality food. Poor quality and cheap foods typically contain mostly fillers which the dog can't use, and so it won't fill them up. As a result, they may eat their poop to try and regain nutrients left over. This can be a problem in particular if the dog's digestive system doesn't produce enough of the necessary enzymes to digest the food properly so the nutrients can be absorbed and used in the body.
- if the portion of food they're being given is too small. It's like a person being given a meal which doesn't quite fill them up wanting something else after it too.
- relation to dominance. One of many ways which dominance is shown among dogs who live together is by a submissive or less dominant dog eating the poop of more dominant dogs.
- if the dog has some kind of parasites which are taking nutrients from them, like intestinal worms such as tapeworm.
- in order to get a reaction. Like with other abnormal behaviors in dogs - like tail chasing in adult dogs - if people have responded to the dog eating poop, the dog will think to do it, since that's how they get a person's attention.
- it could also be a force of habit, which can be hard to break.
In order to deal with it, try this:-
- have the dog examined by a vet first. This way, if it's down to a medical reason, it can be cured. If it isn't down to a medical reason, it can be ruled out.
- feed the dog as high a quality food as you can afford to.
- dietary supplements can sometimes help too.
- clean up after the dog as soon as he's 'done his business', and don't let him off lead in public, as he could eat the poop of other dogs which some irresponsible owners sometimes will leave instead of cleaning up.
- you could also try distracting the dog to divert his attention from eating the poop, for example throwing a treat to him away from the poop, so he's too engrossed in going after the treat.
- add a teaspoon full of accent flavor enhancer to the dog's food twice a day for 3 days. This contains monosodium glutamate, a digestive enzyme which stops the coprophagy from continuing.
Hope this helps.