Even a brick chimney, when first built would have been lined. In the old days this would have been done using a lime based pargeting or render. However, acid and sulphate attack over many years decays the lining so it is crumbled or swept away to expose the bricks. The mortar of the brick work also decays until fumes and smoke is able to leak out of the chimney to other flues and possibly into rooms. More recently chimneys have been built with pumice, concrete or clay liners.
A chimney works using the buoyancy of hot flue gasses and is easily affected by internal factors such as cold air, leaking into the flue, a cold or slumbering stove or fire and external influences such as poor siting, weather conditions and birds' nests. Lining ensures that the flue is properly sealed, the correct size for the appliance or fireplace and possibly insulated to keep gasses hot. This then ensures the best safe and efficient operation of the appliance or fireplace
The type of chimney lining and materials vary, depending on the type of fuel, appliance and house construction. For example, boiler stoves need a lining resistant to tar, creosote and acids, new properties cannot be lined with flexible liners and thatched properties may need a twin wall insulated flue depending on Building Regulation requirements.
Chimneys are lined for a number of reasons, safety being the primary one. All stove installations are subject to Building Control.