Evolution is a 0th-Order Optimizer
— or —
On Boobies

What came first, chicken or egg?
Well, that one is easy: the egg. Many animals laid eggs that existed before the chicken.
What came first, the chicken or the chicken egg?
The chicken is the result of a gradual evolutionary process. We define a specimen’s association with a species based on its DNA. Thus the arbitrary line that separates chicken from pre-chicken was first crossed by an egg.
What came first, the boob or the behavior of babies to consume milk?
This one is a bit harder. For chickens to come into existence, proto-chicken just had to gradually slide along their evolutionary path of step-by-step mutations increasing fitness.
But this is not possible for lactation. Boobs are rather complex biological systems. They don’t suddenly come into existence. But during their construction, before they become functional, there is no evolutionary benefit. Babies can’t start to benefit from consuming milk before the milk production actually works. This seems like it requires a jump. Evolution has no foresight; it can only reward what already works. A half-built booby does nothing. So how does it ever get built? Either babies must demand milk before its invention so that evolution can invent boobs, or evolution needs foresight, knowing that inventing bobsies is a good idea without any positive feedback for thousands of generations. We would not expect evolution, as the 0th-order optimizer that it is, to be able to find such optima.
Figure 1 A loss landscape: the optimizer follows the gradient, no lookahead.

Source: substackcdn.com
Where do mammals come from
Product of gradual evolution. Some species branched off of intermediary proto-mammals and stopped moving along this trajectory. Species which emerged from these proto-mammals are in many ways like mammals but with some later inventions missing. So they are rather interesting for understanding this trajectory, as they are basically a snapshot of such an intermediary state.
Figure 2 Mammal phylogeny: monotremes branch off 166 million years ago, before therians.
The Platypus
Figure 3 Platypus (Ornithorhynchus anatinus). Source: NSW National Parks

The platypus is such an animal that comes from proto-mammals. And its suckling strategy is interesting: female platypuses do not have any boobies. Instead they just have fat folds (technically called areolar patches) on the front of their body. They sweat nutrient-rich sweat between these folds: no longer normal sweat, no longer transparent, but yellowish and thick due to its high nutrient content; already on its way to becoming milk. Baby platypuses then lick the sweat from between these folds.
And so this answers our question: there is an evolutionary path with immediate feedback. Proto-mammal babies at some point had the idea to lick sweat off their parents’ bodies to absorb the contained nutrients; this gave them an evolutionary advantage, since they had more nutrients. This then provided females an evolutionary edge if they increased the nutrient content in their sweat. This then reinforced the sweat-drinking behaviour in proto-mammal babies. Each step in this chain provides an immediate fitness benefit. No jump, no foresight needed. And then over many generations of proto-mammals, the high-nutrient-sweat production was optimized, localized, and turned into the mammalian boobies.
Isn’t nature amazing?