"Since bacteria are extremely numerous, random mutation of bacterial DNA generates a wide variety of genetic changes. Through mutation and selection, bacteria can develop defense mechanisms against antibiotics."
Mutation happens all the time because cell replication isn't perfect, some mutation are irrelevant, some deadly, some bring better chance of survival.
It's not a response just the result. Or how does the bacteria know it's an antibiotic and not just water? It doesn't, water just isn't a evolutionary filter, antibiotics are.
If I introduce an antibiotic into a culture of bacteria and they evolve resistance, then they appear to be responding to it on a collective level.