Variation exists before treatment
Bacterial populations can contain genetic variation produced by random mutations. A variant may make a bacterium resistant to a particular antibiotic. The useful mutation does not arise because the bacterium needs to survive treatment.
In this model, orange bacteria are resistant and blue bacteria are susceptible. Both are present before the antibiotic is added. Resistance is a property of the bacteria, not the patient becoming used to the medicine.