Well it could be a health problem, so I would urge you to get your dog checked out by a Vet. Eating Poop, otherwise known as Coprophagia, can be caused by intestinal parasites, pancreatitis or because the dog isn’t absorbing the nutrients needed in their diets. The Vets could also tell you that they do not have this health problem, so what other reasons could make a dog eat poop?
It could be copied behaviour...Mothers certainly clean up after their puppies and so puppies could learn from then on, or dogs could also be copying other dogs doing this or even you :-), Well I'm sure you don't eat poop, but they may have seen you cleaning it up from the garden etc and so they could be copying you by doing the same. Dogs do learn by watching others.
A Puppy may have been disciplined by pooping in the house and so may try to hide it if he does it again. Or they may enjoy having the attention even though it would be negative attention as Dogs do crave attention.
I'm sure you'll all agree that dogs eating poop is not good, Yuk! But it is better to try to determine why they are doing this so as to find a way to deter this behaviour.