The cows have probably been milked 2 or 3 days previously. These days cows are milked on farm twice a day, but milk is stored on farm at chilled tanks for 2-3 days before being collected by large tanker and taken for processing. Because of low temperatures and excellent hygiene on farms nowadays, there are very low numbers of bacteria, and pasteurisation kills 95% of those, so milk lasts much longer than it used to, when hygiene was poorer.
However, if milk is sitting in warm temperatures on a doorstep, the bacteria remaining will start multiplying and the milk may not last nearly as long as milk bought chilled in supermarket and put straight in fridge. However, those who find it convenient to get milk delivered, will probably use it quickly anyway.
Insulated container as grannysyb suggests might help in warm weather.