A flue-gas stack, also known as a smoke stack, chimney stack or simply as a stack, is a type of chimney, a vertical pipe, channel, or similar structure through which combustion product gases called flue gases are exhausted to the outside air.
The exhaust stack is responsible for removing the combustion gases from the heat exchangers. (This is the reason a cracked heat exchanger is such a serious issue; you want the exhaust gas to go up the stack, not leak into the cabinet.) The gas naturally rises through the vertical shaft to be safely vented outside.
The primary task of an exhaust stack is to keep building occupants and the surrounding area safe from hazardous concentrations of exhaust contaminants.