The dog or cat who is overweight is probably starving.  She is seeking nutrients from foods that have too little nutritional value,  and therefore is eating too much.  Commercial pet foods are filled with things an animal doesn't need----sugar, salt, waste fillers, chemicals.  These same foods lack what is required for animal health---vitamins and minerals, enzymes, proteins, vegetables, grains.  Malnutrition and/or malabsorption are important factors in animals and human obesity, as are food allergies and sensitivities.  Other factors include glandular malfunction, boredom and habit, lack of exercise, competition for food with other pets and guardians who substitute food for love.