I've seen both of mine, the Border Collie and Reesie the Yorkie, eat cat poop. The vet told me they seem to know when they might be missing something in their diet and a lot of dogs will eat cat poop. At one point, Reesie was so full of cat litter from eating that stuff that she had to spend a couple days in the vet hospital. As far as dogs eating another dog's poop, the same reasons seemed to apply. Vitamin deficiency, or the 'meal' contributor has a medical problem and isn't completely digesting his food.
Sometimes they just like the taste!!