Some strains might be resistant to antibiotics, and so are not killed. They survive and reproduce, so population of the resistant strain rises. The resistant strain will the spread because people are not immune to it and there is no effective treatment