Why is cat food bad for dogs to eat?



My pug will eat the cat food instead of his own food anytime our backs are turned. Vet says not to let that happen but why?