Two things that should be noted:
1. When you clay bar the vehicle, you are removing the orange stain caused by the rusting metal and "shearing" the portion of the metal particle that is protruding above the surface of the paint. The portion that is embedded in your paint remains to rust again. To completely remove the metal you need to use a product like IronX. It chemically removed these metal particles.
2. While the most common form of rail dust is caused in transport, it is also caused by brake dust, plow blades, ect. So even though you have removed it as mentioned above, it's going to come back.
I'll also note that part of the dealer prep. is to treat the vehicle before it is offered for sale. Unfortunately this step is often overlooked, mainly because rail dust is very hard to see on vehicles that are not lighter colors. It's there though.