The oxygen-depleted air, which consists mainly of nitrogen, can be returned to the atmosphere with no harmful effects on the environment, while the carbon dioxide can be collected separately from the inside of the tubes after combustion.
An alternative would be to control the flow of air and methane so that only partial combustion took place. This would result in a flow of 'synthesis gas', a mixture of carbon monoxide and hydrogen, which can easily be converted into a variety of useful hydrocarbon chemicals.