The chemistry of this is "quite interesting".
Firstly, ordinary rusting is due to Oxygen and Carbon Dioxide dissolved in water. This doesn't have much effect when a boiler is operating because the two gases are taken away with the steam. But if the boiler is left to cool with water and air in it, then rusting will be aggressive. This is why it's important to either dry out an unused boiler or to completely fill it with boiled water and an additive.
Secondly, rust already in a boiler from the first cause provides a site at which an electro-chemical reaction will occur. This together with trace impurities will cause rapid corrosion and pitting.
Thirdly, water is a powerful solvent capable of directly attacking slag or other impurities in the steel. Additives reduce this effect.
Fourthly, the presence of Iron-Manganese Sulphide in boiler plate was once a serious problem as it promoted the formation of rust cones containing sulphates and sulphuric acid that were very liable to perforate the plate. Additives and quality control reduce this effect.
Fifthly, water is decomposed by Iron at about 350C to make Iron Oxide and Hydrogen. The necessary temperature is reached if a tube is coated with incrustation, which is prevented by only using pure water in a boiler.
Ordinary rusting due to air and water occurs on the outside of the boiler as does electro-chemical rusting around impurities. The later mechanism has a strong local perforating action. Consequently some steels are better for boiler making than others.
In a large steam plant like a power station very elaborate precautions are taken to use suitably treated water and materials. For example Copper Alloys are not used at all because Copper is soluble in high-pressure steam (2400psi at 500C). Silica, Chlorides, Oxides, Organics and Sulphates are all carefully removed from the water, not because they corrode the boiler but because they erode the turbine blades.
A carelessly operated boiler won't last long, but good management will extend its life considerably.
Dave