Answer
As a defense or competition mechanism against other microorganisms.
Work Step by Step
Antibiotics eliminate certain bacteria from the environment, allowing the organism that produces them to colonize that environment, eliminate competition, etc.