Most pneumonia is infectious, and is most times caused by strep bacteria, so they throw antibiotics at it, and see
how the patient responds, there are more aggressive atypical bacterial
pneumonia that may require more aggressive treatment, also a persons age, and strength of their immune system is a major factor as well. But there are also viral, fungal, or less commonly parasitic causes of pneumonia. None of which is affected at all by antibiotics, each has it's own unique treatment.