With respect, this ^^^ gets more wrong than right. I STRONGLY recommend readers disregard the above advice.
The typical Scratch (let's pick on Purina for a moment, and we'll use their
Flock Block as our reference, noting that it is nutritionally superior to their
"Scratch" mix) is comprised of whole or cracked corn, grains, and typically with the addition of some seeds. In the case of the Flock Block, it comes in at 9% protein, 8% is more typical. That's less than half what
USDA/NRCS recommends for meat bird breeds, and roughly half what they recommend for laying hens (pages 3, 4, 5).
The hens stop laying because they are starving to death, converting muscle to energy, with real risk of long term damage to the internal organs, particularly the heart and brain. On request, I can link numerous studies establishing these figures in commercial meaties and commercial layers, going back decades.
Moreover, the composition of the the typical Scratch is corn, grains, and nuts. Science time. Every animal on the planet is made up, in part, of proteins. Proteins are comprised of amino acids. Typically, an animal can not create on its own every amino acid it needs to survive - some it has to get from its diet. These are called (most commonly) "Limiting" Amino Acids or Essential Amino Acids. "Limiting", because without which they can't build needed proteins, and will fail to thrive, ultimately dying. In the case of a chicken, the Limiting Amino Acids are (marked in bold are those most critical for our purposes):
Arginine
Cystine
Histidine
Isoleucine
Leucine
Lysine
Methionine
Phenylalanine
Threonine
Tryptophan
Tyrosine
Valine
Now, as it turns out,
Corn is nutritionally deficient in Tryptophan and Lysine. Grains are usually defient in Threonine and Lysine. Nuts/Seeds are typically deficient in Lysine. So while it may be that here is enough "extra" Threonine in Corn and the Nuts/Seeds to make up for its deficiency in the grains chosen, and enough Tryptophan in the Nuts/Seeds and the Grains to cover its lack in the corn, all of them are low to almost absent in Lysine.
Lysine helps chickens regulate nitrogen, regulate carbohydrates, synthesize nucleotides, deposit calcium to make bones, absorb phosphorous, and a handful of other life critical functions. Like a sailor developing scurvy from lack of vitamin C, feeding an all Scratch or significant Scratch diet is so deficient in this critical,
LIMITING Amino acid that chickens won't even be able to effectively use what protein and energy the Scratch does provide.
Now, as it turns out, poultry feed labels aren't well regulated. Most don't list their amino acid levels. A few will list a couple of them, usually Lysine and Methionine, because those are the two most critical, most limiting Amino Acids in a chicken's diet, and because (typically, due to the way many common forage and feed plants make amino acids) if you can get those right, you often get the right ratios on the others, as well.
Purina doesn't list those for its Scratch. Neither does
Nutrena. But Purina does provide Lysine and Methionine numbers for its Flock Block. According to USDA/NRCS (link above),
UGA, and numerous studies over the decades, you want to see a number around 0.5 - 0.65% (sources differ a bit) Methionine for Chickens, and around 1.20-1.40% Lysine.
Remember how I said that corn, grains, and seeds/nuts were all deficient in Lysine??? Purina's Flock Block contains just 0.15% Methionine, and a mere 0.3% Lysine - less than 1/4 of what they need to survive.
SO, having devoted more time to this post than the prior respondent, I would ask that - in the future, before others provide similar response to a person who may know less about feeding chickens than yourself, come here to BYC for advice, either say nothing (a certain famous quote "Better to remain silent..." comes to mind), or be honest enough about your recommendation to offer it accurately, to wit:
"You can cause your hens to stop laying by starving them to death on an all Scratch diet. But don't do it for long."
There is no "one, right way" to raise chickens responsibly, but there are an awful lot of wrong ones. An All Scratch/mostly Scratch diet is among the definitively, provably wrong ways to do so. I don't have the patience to lay out what you got wrong in your summary of "layer feed", and have run out of the respect needed for it to be worthy of my time investment.
/end rant.