system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Why do natural gas plants have a burning smokestack? Or flare stack?

I think I get why they do it. Its a safety issue. But why cant they extract the gas and use it for energy? It has to be incredibly wasteful, both economically and as far as conservation goes.
gpt
Natural Gas plants work by purifying "sour" gas (high H2S) from the ground into "sweet" (low H2S) gas. H2S is the main pollutant from the process, although a few other trace gases may be present. The requirements for sweet gas are around 4 parts H2S per million parts gas. Very little of the major components of natural gas (methane and ethane) are removed with the H2S. The little bit that is unavoidably removed with the H2S is, as you said, used for energy elsewhere in the plant, namely in the sulfur making process described below. 
 
The H2S that is removed is usually sent to a different process to make sulfur to be sold as a byproduct. This process requires multiple reactors, catalysts, piping, etc to work. Each reactor can only achieve about 70% conversion of H2S to sulfur. Thus a high recovery requires multiple reactors. Even afterwards, however, there is still some H2S remaining. EPA requires that H2S emissions be no higher than 5 parts per billion or so. 

At some point, it becomes more cost effective to just burn off the little bit of H2S to make SO2(which is less environmentally hazardous, although still strictly regulated) and H2O, rather than building another reactor sequence in order to extract what is an increasingly deminishing return of sulfur. Basically, the flare stack is used when the cost of installing another reactor would be greater than the additional added value that that reactor would produce over the lifespan of the plant.

Edit: The sulfur making process requires high temperatures. To create it, H2S is reacted with SO2. To make the SO2, a little bit of H2S must be combusted at the high temperature, and then the reaction can proceed. This is where the little bit of methane and ethane can help, because they can be combusted at the same time to create the high temperatures needed for the reaction.