Until that time, people bought milk as a bulk item, with the seller dispensing milk out of a keg or bucket into whatever jugs, pails or other containers the customers brought. That practice left a lot to be desired on the cleanliness front. Some dairies tried offering milk in fruit jars, perhaps because customers had started bringing the resealable containers to them to be filled.
The new method of delivery eventually caught on. By the first decade of the 20th century, some cities were legally requiring that milk be delivered in glass bottles. Because of better sanitation and a lower bacteria count, thousands of children who otherwise may have died instead grew up to be healthy adults. Childhood diseases and deaths decreased after 1879 for a variety of reasons. Sanitary delivery of milk certainly was a contributing factor.
You can read more at http://tinyurl.com/y8nkdca