Izzat why dogs often eat poop (coprophagia)?
Not really, it's more that some animals, dogs included depending on diet, don't fully digest everything with only one pass through the digestive tract. If their noses tell them there's sufficient protein(and/or other nutrients) remaining in the fecal matter.... Rabbits are notorious for this.
It's also why you can often solve the problem by changing their dog food to one that's easier to digest. Unless there's other behavioral issues if the dog's already getting all the nutrients out the first time they won't eat it for a second pass.