It dates back to the days before heat-resistant paint. The only way to keep the smokebox from turning into a lovely shade of rust was to apply a mixture of graphite and oil to the smoke box (firebox too) and let the stuff bake on.
Later on someone sold a product called "Staybrite Locomotive Front End Polish" That accomplished the same thing. There used to be the remains of a 5 gallon bucket of the stuff in Chama. It looked like graphite and valve oil goop.
Now you have high-temp paint. Aluminum works, but I always liked the dark grey graphite color (1 part hi-temp aluminum, 3 parts high temp flat black) because it aged better and didn't show all the back streaks down the side the first time the engine puked on itself.