I'm not convinced that there must be a cost; furthermore, I think it's unlikely that if there is a cost, it is high enough to be significant. Bugs evolve, but they do not necessarily evolve optimally all of the time. It is possible that an evolutionary step towards resistance might also improve the fitness of the germ overall (for example, by further optimizing the efficiency of a metabolic pathway). That evolutionary step might have been inevitable, but required additional selective pressure or the presence of a more active mutagen to actually occur.
Your claim is sort of assuming that each bug is already optimal for its environment, and any change must therefore be deleterious in some regard, but I hold that neither fact is necessarily true.