No one really knows the true answer to this one. It could just be instinct.
This can be a carryover from when dogs were wild. Wild dogs would do this to cover their tracks from predators and to protect their young.
Dogs may do this if they are deficient in certain things in their own bodies. In humans, this is known as pica, where humans (often children) get the urge to eat things that are not food. That is the danger with lead paint, since some kids will eat it. Giving them sufficient nutrition may help curb the urge.
Dogs will eat feces if they mistake it for food, due to the undigested proteins. This should be avoided due to possible worms or bacterial contamination.
Some animals will eat their own feces because of left-behind nutrients. This is called coprophagy. Mostly just livestock and wild game do this.
Some dogs may just eat what they see, even if it's not edible. They are not as smart as us so they dont know it's bad for them.
Even vets don't have the answer to why dogs will eat cat feces or even dog feces for that matter. It's logical that it goes back to the time when they were once wild. There is so much we don't really know about dogs and cats.
they like sex