That's just a matter of feeding too much though, not because the food is necessarily unsuitable. That's why properly portioning food is so very important. Puppy formulas are generally higher in fat, and more nutrient dense, than adult maintenance formulas, and fat delivers 2 1/4 times the amount of calories per weight unit compared to proteins or carbohydrates.
Dogs are carnivorous animals, with a and do best on a diet that emphasizes meat and fat, not carbohydrates. While they can digest and utilize carbs, they do not have a nutritional requirement for them, unlike for protein and fats. Any reduction in the amount of protein and fat in a food only boosts its carbohydrate content, and that's just not a species appropriate way to feed.
On top of that, many owners feel bad about the small portions that are required of nutrient-dense dry foods, especially for small breeds, and feed them more than necessary, plus pile on the treats without reducing the feeding amounts. The difference between 1/4 cup twice daily and 1/3 cup twice daily may not look all that significant to someone who doesn't pay much attention to begin with, but in a food that delivers 450 kcal per cup for example that's a difference between the dog getting 225 kcal or 300 kcal per day.
75 extra calories per day means 27,375 extra calories per year. One pound of body fat contains approximately 3,500 kcal, so you are looking at a gain of over 7.8 pounds in a year.
If you look at the "new generation" dry foods that are high in protein and low in carbs, those pretty much all automatically qualify as "all life stages" because they meet the requirements for all the AAFCO nutrient profiles. People who do not portion these foods properly will have the same experience of the dog becoming overweight, but that's not the food's fault.
You really do have to evaluate each particular food in regards to its specific suitability, not just by looking at the nutritional adequacy statement. Mineral content can be an important factor in certain situations for example, but percentages listed are always relative, not absolute, so it makes more sense to calculate intake based on the nutrient density of the food (e.g. calcium and phosphorus amounts per 1,000 kcal) and how much the dog actually gets on a daily basis when eating a certain amount of food to maintain weight.
So, long story short, there is nothing wrong with feeding puppy food, but as the growing dog's energy and nutrient requirements decline, you have to reduce the feeding amount, or you'll end up with a fat dog.