Carbon steel will just corrode over the entire surface in chlorides, as the chlorides provide a nice electrolyte for the corrosion mechanism. With stainless steel, the chlorides chemically react with the chromium oxide passivation layer, causing it to break down in localized spots, exposing unprotected material to the electrolyte. The stainless steel cannot re-form a protective layer, because the chlorides prevent this from occurring as well, and the pitting mechanism gets started.