It wasn't. "Stuff that kills bacteria" has been known for a long time, including times when nobody knew what bacteria were. Not every dirty wound was fatal, there's mixes of plants, applied to wounds, that do a good job.
Penicillin was the first highly effective AND mass producible antibiotic, though.