"We now know that many mutations in bacteria are caused because the bacteria decided it needed the mutation. It even has special DNA polymerases to cause specific kinds of mutations, whose use is regulated. "
As a microbiologist, I'd like to know more about this. Please enlighten me, preferably using references.
For certain mutations, such as ebgR, it is regulated by PhoPQ: