The only difference between substrates A and C is disulfide vs sulfone nature at 9-position. Actually, that is good enough to display this major stereochemical outcome. As explained in Ref.1, the disulfide nature at 9-position of A has an advantage of having two lone pair on sulfur, one of which is proximate enough to attack backwardly on $\ce{C-Cl}$ bond ($\mathrm{S_N2}$ in nature) to give an episulfide ring (see following diagram and the extended comment of ron). The reaction center must have an inversion of configuration since the mechanism is $\mathrm{S_N2}$.

This episulfide intermediate undergoes ring opening backward attack by the intended nucleophile (e.g.,$\ce{N3-}$) to give the final product under 2nd $\mathrm{S_N2}$ mechanism. This stepwise replacement of chlorine by a nucleophile, the first substitution being considerably faster than the second, was first observed by E. J. Corey and E. Block (Ref.2). The nucleophile of their reaction was methoxy group of methanol (solvolysis). However, although they are the first group to suggest the 1,2-epi-sulfonium ion intermediates in these reactions, it was suggested for the initial dichloro compound A formation, not for the solvolysis by methanol. These types of neighboring group participation (NGP; or anchimeric assistance) have been observed previously for bridging carbon, nitrogen, and boron, all for the bicyclooctane series. In mechanistic point of view, this double inversion process preserves stereochemistry in substitution reactions on 2,6-Dihalosubstituted-9-thiabicyclo[3.3.1]nonanes (Ref.3).
Finally, C cannot follow the fast double inversion process due to the lack of a lone pair on $\ce{S}$ bridge, yet undergoes usual $\mathrm{S_N2}$ transformation (slow because the leaving group is $\ce{Cl}$) under the given conditions.
References:
- D. D. Díaz, A. Converso, K. B. Sharpless, M. G. Finn, “2,6-Dichloro-9-thiabicyclo[3.3.1]nonane: Multigram Display of Azide and Cyanide Components on a Versatile Scaffold,” Molecules 2006, 11(4), 212–218 (doi: 10.3390/11040212).
- E. J. Corey, E. Block, “New Synthetic Approaches to Symmetrical Sulfur-Bridged Carbocycles,” J. Org. Chem. 1966, 31(6), 1663–1668 (DOI: 10.1021/jo01344a001).
- A. Converso, K. Burow, A. Marzinzik, K. B. Sharpless, M. G. Finn, “2,6-Dichloro-9-thiabicyclo[3.3.1]nonane: A Privileged, Bivalent Scaffold for the Display of Nucleophilic Components,” J. Org. Chem. 2001, 66(12), 4386–4392 (DOI: 10.1021/jo015632y).