Why Boxer dog's die young

My shepard can't eat ham. She'll puke every time, gets the trots real bad. Table scraps in general seem to set her off, so this is off her diet. She also developed a habit of licking her paw till it became raw. Vet gave some anti-itching meds and this is clearing up. All this from a dog who used to eat rotted birds she would find in the bush! Once she ate a box of school fund raiser chocolate bars my son had brought home from school. No obvious bad effects, but my wallet was $60 lighter.