There are many reasons that dogs eat their own feces as follows:
Some dogs just like the way it tastes, or,
They are trying to hide it, and eat it if they cannot bury it, or,
They have parasites, or,
They have nutrient deficiencies, or,
They require probiotics, or,
They have pancreatic insufficiency, or insufficient digestive enzymes, or,
They have Inflammatory Bowel Disease, and stomach heat.
However, all of the above is just speculation, no one has ever discovered the actual cause.
I have had dog patients stop eating their poop when placed on probiotics, and/or digestive enzymes, and when I have changed their diets to a more wholesome, fresh meat and vegetable based homemade diet with added vitamins, minerals and supplements. But then again, some dogs continued to eat poop even with the dietary changes.
thank you this was very helpful