Bacteria stop spreading when they reach an area of greater antibiotic concentration

Bacteria stop spreading when they reach an area of greater antibiotic concentration. Some start spreading again when they gain a mutation that lets them. Why don’t all of the bacteria just develop the mutation and keep spreading right away?