Actually, bacteria are, shall we say, particularly mutable (only one strand of genomic DNA, plus plasimids if they're useful), and they can do so rapidly.
It's an issue of selection pressures. If they live in a competitive environment, which includes competing against each other, then the most "fit" ones win by out reproducing the competition. Mutations that made them more fit in an environment rife with antibiotic X may be mostly harmless in the absence of X, or might consume resources that can ill be afforded. See e.g. this subthread for more discussion: https://news.ycombinator.com/item?id=8853232
There is a price to be paid for those defensive abilities. If paying that price no longer affords any benefit that would put selective pressure on removing those now needless defenses.