Its called Coprophagia. Sometimes due to nutrient deficiency (vitamin B) or digestive problems, eating too quickly and not absorbing vitamins, or behavourial problems.
Adding pineapple or corgettes to the diet is said to make the 'poo' taste unpleasant, and stop them eating it.
On a British Arctic Survey in 1952, scientists dumped their excrement at the bottom of a slope behind the toilet hut, where it froze solid. When spring came, it thawed out, and the sled dogs were seen eating it. Thinking that the dogs were gaining something from doing this, the scientists analyzed the excrement, and found that (because of their carefully worked out diet) it contained no nutrients whatsoever. The conclusion? The dogs simply liked the taste of the stuff!
I know puppies do it, and also dogs who eat too much, I found that dog poo smells like the food they have eaten so some dogs eat it again whe it comes out of them, try watching your dogs and when it goes to eat it say "leave it" in a firm deep voice, dont try remove it from its mouth not good idea, after a while the dog should stop doing this, fingers crossed it works.