Actually,
"The discovery of antibiotics began by accident. On the morning of September 3rd, 1928, Professor Alexander Fleming was having a clear up of his cluttered laboratory. Fleming was sorting through a number of glass plates which had previously been coated with staphyloccus bacteria as part of research Fleming was doing. One of the plates had mould on it. The mould was in the shape of a ring and the area around the ring seemed to be free of the bacteria staphyloccus. The mould was penicillium notatum. Fleming had a life long interest in ways of killing off bacteria and he concluded that the bacteria on the plate around the ring had been killed off by some substance that had come from the mould."
"Further research on the mould found that it could kill other bacteria and that it could be given to small animals without any side-effects. However, within a year, Fleming had moved onto other medical issues and it was ten years later that Howard Florey and Ernst Chain, working at Oxford University, isolated the bacteria-killing substance found in the mould - penicillin."
"In 1941, a doctor, Charles Fletcher, at a hospital in Oxford had heard of their work. He
had a patient who was near to death as a result of bacteria getting into a wound. Fletcher used some of Chains and Floreys penicillin on the patient and the wound made a spectacular recovery. Unfortunately, Fletcher did not have enough penicillin to fully rid the patients body of bacteria and he died a few weeks later as the bacteria took a hold."
Antibiotics
It was developed to prevent death. It just so happens antibiotics can heal
bacterial infections as well.