We have had three beagles, only one ate his poo. Casie came from a show dog breeder, and I am sure that's where he learned his disgusting habit. BUT he only does it if the piles are frozen solid. A poo popscicle.
Anway, he taught the other beagle to do the same thing....grossness loves company. So we inquired about this, and our vet told us that basically this is what dogs and their ancestors did in the wild --- yuck!

So as long as our dogs were the nly ones in the yard, it was us who were grossed out by it, not them. BUT if we didn't want them to do it, he had some powder to sprinkle on their food once a day to make their poo smell disgusting (?) and they wouldn't eat it....didn't work. Tried hot sauce, ketchup, onions, and finally read that pineapple chunks worked for someone...so when I see the pattern start, I put 4 pieces in their food for their two meals a day, and it works. Don't know why, but it does. Matter of taste for them, love the pineapple, hate to poo.
Good luck, I find it horrible too.....