Final answer:
Erythromycin is administered to infants' eyes after birth to prevent complications from neonatal conjunctivitis.
Step-by-step explanation:
To prevent complications from neonatal conjunctivitis, specifically caused by exposure to bacteria during passage through the birth canal, erythromycin is administered to infants' eyes shortly after birth. Infants can develop ocular discharge and a red eye due to infections like gonococcal ophthalmia neonatorum or inclusion conjunctivitis. The use of erythromycin helps to reduce the risk of serious complications such as corneal ulceration, which can result in vision loss or permanent blindness.