Certain bacteria that produce hydrogen sulfide as a waste product would die if directly exposed to oxygen  The hydrogen sulfide reacts with oxygen, removing it and so preventing it from harming the bacteria  Furthermore, the hydrogen sulfide tends to kill other organisms in the area, thereby providing the bacteria with a source of food
As a result, a dense colony of these bacteria produces for itself an environment in which it can continue to thrive indefinitely
A dense colony of the bacteria can indefinitely continue to produce enough hydrogen sulfide to kill other organisms in the area and to prevent oxygen from harming the bacteria.