A quote from the following link:
Dog E. Coli Infection - E. Coli Infection in Dogs | petMD Causes
Colibacillosis is ultimately due to an E. coli infection. However, risk factors for this type of infection include poor health and nutritional status of the pregnant bitch, lack of colostrum (first milk) to the puppy, unclean birthing environment, difficult or prolonged birth, crowded facilities, concurrent infection/disease, inflammation of the mammary glands in the nursing bitch, and placement of intravenous catheter.