Flue marks

What causes such marks on this water heater/boiler flue pipe?

DSCF5477 (Small).JPG

Google carbonic acid on exterior of galvanized gas vent pipe.

Thanks, Larry, but the units are not high efficiency and they are the same age of the home - '97.

Yeah, I thought that by the vent…

You don’t need high efficiency for carbonic acid. The products of combustion are CO2 and Water, if the exhaust condenses inside the chimney you get water containing CO2. Why B vent has an aluminum liner.
Not unusual to see on older installs, recommend replacement if it is badly rusted. Maybe an HVAC tech to see if the chimney is sized correctly, oversized chimneys are more likely to have this problem.

Combustion gas is condensing on the flue cap in the winter.
Acid removes the galv. It rusts. It should be double wall and not matter.