Check out this article for possible reasons
20 Reasons Why Dogs Eat Poop (Coprophagia, Pica)
My baby used to eat his own poop but only when he had an accident inside so we figured that he's hiding evidence. Once he's potty trained to go outside, this behavior stopped. He never tries to eat his poop outside. And I always pick it up with tp and flush down the toilet so my lawn stays clean and he's not tempted to eat it.