I’m pretty sure they grease the rails in some spots, particularly the curvy bits that are often near platforms so it would get stuck to the rails and such. Cars would put out massively more pollution but it’s more free to blow around in the wind.
I had some boxes stored in a storage cage in my apartment car park and after 6 months sitting there, they were all coated in a thick black dust. Since there was no wind or rain to move it around, it just settles and builds up.