It might not've been though. There was big advertising push in the early/middle 1900's to get infants off breastmilk and onto formula as the "modern" way.
Even today, there are large differences related to socioeconomic class, in how many parents use formula. Also varies a LOT per country.
Since the 80's, there has been a renewed push for breastfeeding. Advertising has been curtailed, for example, https://en.wikipedia.org/wiki/International_Code_of_Marketing_of_Breast-milk_Substitutes