Explain the antibiotic resistance observed in bacteria

Explain the antibiotic resistance observed in bacteria in light of Darwinian selection theory.

Darwin’s theory of natural selection states that the environment selects organisms with favourable variations and therefore, these organisms survive and reproduce.
It has been noticed that when bacterial populations are exposed to certain antibiotics, the sensitive bacteria could not tolerate and hence, died due to the adverse environment.
Whereas some bacteria that developed mutation, became resistant to the particular antibiotics and survived. As a result, such resistant bacteria survived and multiplied quickly as compared to other sensitive bacteria.
Thus, the whole population is regained by multiplication of resistant varieties and antibiotic resistant genes become widespread in the bacterial population.