When I was doing some molecular genetics on E. Coli in the summer of 1977 I was told that for many antibiotics, 1 in a million of them would spontaneously mutate and develop resistance if exposed, and 1 in a billion for streptomycin.
Note that there are many methods of antibiotic resistance, including little pumps that try to keep the level low enough inside the bacterium. They've been developing them for a very long time, the other insight you need into this is the ecological one.
Most are from molds, and they release them to better compete with bacteria. And a resistant bacterial strain will not necessarily compete well with others lacking its mechanism(s) because those are otherwise maladaptive . E.g. it's spending raw materials and energy producing a β-lactamase while its competitors are dividing more rapidly. Only when you add the selection pressure of the antibiotic does it win big.
There's also a strong role for horizontal gene transfer in antibiotic resistance, e.g. by swapping plasmids, which can allow bacteria to swap higher-granularity mechanisms, rather than having to evolve them from scratch with random mutations.
This feature is basically bacterial sex and turns their evolution from a slow serial computation to a highly parallel computation that gives an exponential speedup in evolution.
I think this effect is the extremely under appreciated benefit of sex/exchanging dna.
Note that there are many methods of antibiotic resistance, including little pumps that try to keep the level low enough inside the bacterium. They've been developing them for a very long time, the other insight you need into this is the ecological one.
Most are from molds, and they release them to better compete with bacteria. And a resistant bacterial strain will not necessarily compete well with others lacking its mechanism(s) because those are otherwise maladaptive . E.g. it's spending raw materials and energy producing a β-lactamase while its competitors are dividing more rapidly. Only when you add the selection pressure of the antibiotic does it win big.