My dog got really sick after eating a cat poo. Ecoli infection which led to chronic colitis. So it is not a harmless behaviour, take care.
Well, it's not so much a question of what's "wrong." Most dogs actually like to eat poop. Gross, yes, but not necessarily abnormal. There are all kinds of theories about why dogs behave that way, but still no clear answer.
The first obvious action is to keep the poo in the yard cleaned up as soon as it appears. Some people have success in repelling this behavior by sprinkling a tiny bit of meat tenderizer on their dogs' food. Something in the tenderizer makes the poo less attractive.
Another thing you can try is changing dog food. What goes in must come out, therefore some foods result in less desirable poo for eating purposes. My dog Maggie developed a clear preference for cat poo. Why? Because cat food is higher in protein than dog food, so the cat poo still has quite a bit of protein in it. I know Maggie well enough by now to read her body language when we're out on a walk. Once those ears and tail come up in combination with the snout pointing into a yard, I know she's ready to dive into a pile o' kitty poo. GAK! At least I can finally stop her before she reaches it now. LOL!