Bacteria with a genetic defect that fails to produce the very thing the antibiotic attacks?
So an effective antibiotic of this kind will handle a particular subset of cell walls, with particular properties, so it kills the pathogens without messing the patient up too much. That "subset" and "particular properties" is exactly the terrain in which evolutionary battles are fought. There is some corner of the configuration space your antibiotic is targeting, one that is reachable by the pathogen just through random mutations. Eventually, given enough chances to try, it'll find its way there.
"Doors and corners, kid. That's where they get you."