Our process of food production, particularly factory farming is rapidly making antibiotic treatment ineffective and may soon make them useless. How did this happen?

Our process of food production, particularly factory farming is rapidly making antibiotic treatment ineffective and may soon make them useless. How did this happen?