One reason is obvious - those better adapted survive and pass on resistence genes.
But the second reason is more interesting - the disinfection will kill the lesser resistant bacterias, so the resistent ones have less competition to worry about, thus they can concentrate their evolution efforts towards resisting the disinfection. Each extra gene a bacteria carries has big costs on it's fitness, so removing the competition increases the available budget for resistance genes.
I know the article is about viruses, I don't know if viruses compete between themselves in the environment.