Mutations in bacteria
that lead to resistance can occur when bacteria are exposed to antibiotics in doses that are not strong enough to kill them. The bacteria then can mutate and develop resistance.
A favorite professor of mine would always say "dead bacteria can't develop resistance.".