SPACE MADNESS
These things are well understood, why not open a textbook.
Random mutations happen millions and millions of times a day. In a culture of bacteria, the antibiotic enviroment is constantly testing the mutations, when one is successful such as adjusting the cell wall so that the antibiotic can no longer access the bacteria, that is now a resistant bacterium that will replicate and dominate more than the others. That new wall may have come about through billions of mutations through millions of generations of bacteria, that may in realtime be 8 years. The pressure or 'thinking' as you called it, quite incorrectly, is nothing more than the USE of antibiotics. By using them we change the enviroment, we alter natural selection.
Lets say we invent a new antibiotic called 'abx x' and we introduce it to a population, the bacteria are still,going about their normal replication and random mutations, now lets say after 11 years some bacteria develop a thixker cell wall and the drug stops working, these bacteria will now dominate that gene pool and become the norm for that species of bacteria, in the geographical area that the drug 'abx x' is being used. Now lets say the drug was never invented, and at year 11 the same bacteria developed that thick wall, it has no advantage and the gene does not dominate the species as it is of no use.
As you can see there is no thought process or intelligence at all.
No offence but you are mistaking your ignorance, assuming that others don't know these things either. They have long been understood. Hence my constant reccomendations of books. You could have easily known this stuff a LONG time ago.
Stop being lazy and open a textbook. The fact that you are talking about bacteria and dna not having a means to think means you have no idea how evolution works. YES we however do, hence it is in tne textbooks, hence you can do the tests yourself.
I work in a hospital, everyone with a confirmed bacterial sepsis gets blood cultures. we find the species of bacteria and we test it for antibiotic resistance. Why because bacterial species have differenct sensitivities depending on the local antibiotics prescribed. So in North Wales the GP's use a lot of Amoxicillin as it is cheap. When someone comes into the hospital very unwell and we have to tackle that bacteria, most of the bacteria in that region of wales was resistant to Amoxicillin. The same evolution and mechanism of testing sensitivity/eesistance applies to every region now.
Drug comapnies have stopped investing in antibiotics because it takes 7 years to get a drug from design to the streets due to all the testing. Because bacteria are evolving so quickly, a drug developed now, is no good in ten years time so it is no longer financially viable to create new antibiotics. It is about to be a BIG problem. So your theory that they were always resistant is nonsense. I see them develop and change sensitivities within my job. I see in real time how prescribing alters bacterial resistance.
Show some humility and pick up a book.....