Evolution perspective - the beginning

The beginning: chemical warfare

When the initial bacteria like life form started life, however that happened, it found itself in an almost unlimited environment. Unlimited food and unlimited space. So there was no need for competition on anything.

As the ozone layer had not formed the radiation levels where much higher than they are now. So it is very likely that after some time multiple different life forms will have developed. Some time could well be several millions of years.
Also in some localities, like shallow pools, space will have become scarce and possibly food also. Thus the need for competition between individuals and between species will have commenced.

The early attempts to attack were developing better ways to adhere to the substrate, or being a bit more efficient with food, being a bit faster in multiplying the species.
Some species will have turned to chemical warfare. If you can excrete a substance that kills the competition while not killing you, you definitely have an advantage. Space and food in abundance again. Thus the first primitive anti microbial substances developed.
Soon however there will have been other species that learned the trick of not dying - they became resistant - so the first defense against chemical warfare also developed. These species had a competitive advantage as they did not have to spend energy on producing toxic chemicals while having the advantage of more space and food.

Other species also learned these tricks so after some significant time had elapsed, a billion years or so, there were many anti microbial substances and many species that were resistant against one or more of these. The latter are called multi-resistant.

This war still rages on today. In vertebrates, such as man, this chemical warfare is called a-specific defense. Many if not most cells in the human body use it on a daily basis.