Stool eating is not a very delicate subject, but it can be a real problem if your dog gets into this habit.
Most commonly seen in winter and younger animals, stool eating is thought to stem from early inherited behavor of wild dogs who often suffered nutrition deficiency in times of game scarcity. They could gain nutrition from about 10% of the quantity eaten.
This behavior is also encouraged by the feeding of "cheap" dog foods which are poorly digested and still contain large amounts of undigested nutrients when eliminated.
To solve this problem, use Deter or Forbid sprinkled onto the foods to give it a taste that dogs dislike.