The use of antibiotics in neonates is primarily to treat and prevent infections. Newborns, especially preterm infants, have an immature immune system, making them more susceptible to bacterial infections. Common infections include sepsis, pneumonia, and meningitis, which require prompt antibiotic therapy to reduce mortality and morbidity.