Nutritional balance is for optimal chicken health, not for the manufacturers' benefit. They wouldn't be in business very long if they didn't provide optimal nutrition. The 40+ nutrients chickens are known to need are in the bag regardless of the primary ingredients. They could be corn and soy or wheat, sorghum and peas. Doesn't matter.
They often do change the ingredients based on what is least expensive at the time but the bag still properly feeds the chickens.
They assay the nutrients in the primary ingredients when the trainload comes to the mill and then the computer programs determine the vitamin, mineral, amino acid and fat supplements that need to be added to make a complete feed. Then the finished product is assayed again to insure it will provide the correct nutrition for the age intended.
Chickens are omnivores. They need more essential amino acids than can be provided by a grain/legume vegetarian diet. Therefor, some amino acids need to be added in synthetic form to meet those needs.
It is true that protein in poultry feed is expensive but that's not the reason for lowering crude protein as birds grow. The main reason for the recommendation to lower protein levels as birds mature is that their bodies are not growing any more and they don't need those excessive protein levels they needed when they were young.
It isn't just about crude protein levels but more importantly is the amino acid profile. That's why both grains and legumes make up the primary ingredients because their amino acid content compliment each other.
In nature, galliformes will eat more animal protein when young and more seeds and forbs when mature. That means, lots of protein when growing and not so much when grown. This disparity is even more exaggerated in gamebirds than in chickens. Newly hatched gamebirds can make use of 26-30% protein and mature birds only need about 12-13% protein.
16-17% protein is more than adequate for mature chickens and even a bit excessive for mature roosters. Birds receiving more protein than they can utilize will be processed by the liver and kidneys, then causes excess nitrogen excretion becoming ammonia in the bedding. Excess protein intake can cause articular gout.
If you want a citation for the aforementioned reasons for lowering protein and even how excess protein can affect onset of lay, here is one source.
https://www.poultryworld.net/Nutrition/Articles/2016/11/Understanding-protein-requirements-2914798W/