Ampicillin is often administered to neonates to treat or prevent bacterial infections such as Group B Streptococcus (GBS), Listeria monocytogenes, and Escherichia coli. These infections can lead to serious conditions like sepsis, pneumonia, and meningitis, which are particularly dangerous in newborns due to their underdeveloped immune systems.