To put it simply, sometimes women just can't. Either they can't make enough, or have mastitis, or have nipples that make for difficult feeding, or just don't end up making any at all, etc.
Yes, women usually do produce milk naturally when they have babies, but sometimes it just doesn't happen, and sometimes, like with most things in life, comes with difficulties that need outside help. Formula was made to help with those difficulties, and because of it, infant mortality rates went way down.
Reminder that there used to be a profession just for nursing babies back before this because mothers being unable to produce their own milk was such a big issue.
Breastfeeding (the innerworkings of it at least) is something that is actually quite complicated. A woman can't just turn her breasts on and off like that. That's not how it works. Not to mention that some babies require dietary aid that can't just come from breast milk alone, and sometimes the mother herself has those issues, and it isn't safe to nurse her baby because of it.
The Nestle incident was the result of vile marketing tactics that directly took advantage of women who had trouble breastfeeding, and as result, a fuckton of babies died. Basically, Nestle lied to the women about everything, and the babies died because the water their mothers would use to make the formula with wasn't clean, and shit. At least, that's the extent of my knowledge about it.
Anyway, sorry to derail the conversation. Just thought it'd be better to explain shit because sometimes people just don't know any better.