It is known that soon after domestication, dogs evolved the ability to digest starch rich foods. In other words to subsist on human food waste. This is one of the things which sets them apart from their carnivorous wolf cousins.
https://doi.org/10.1038/nature11837