As you keep burning wood, a material called Creosote starts building up inside the chimney liner due to burning wood. It is a highly flammable material that can catch fire easily. This can build up inside the chimney at a very high rate if you do not follow good wood burning practices or if the stove is not working properly.
Also, the accumulation rate of this material depends on the type of wood used for burning, as different types of wood tend to produce different amounts of this material. For instance, burning pine can lead to a quick buildup of this material inside the chimney and therefore, it should be avoided on a regular basis. This material not only causes fires but it also reduces the efficiency and draw of your fireplace.
Chimney cleaning is needed to remove any kind of blockages and the creosote that has buildup inside the chimney, firebox, damper, smoke chamber and other places. This will ensure that your fireplace keeps working at the highest efficiency and there is no danger of fire.