Interestingly… SRAM 10 speed cassettes don't have the spacer, you'd think there'd be spacing issues using a SRAM cassette/Shimano mechs, but seemingly not. I guess the sprockets are slightly offset or sommat.
The sprockets are indeed offset. Not the SRAM ones though but the Shimano ones! The thing is, the business side of a 10 speed cassette is actually slightly wider than a 9 speed. The only obvious reason for the offset cogs (and hence need for a spacer) is that they made the splines on first generation DA 10 speed hubs narrower, so you used a 10 speed cassette without a spacer and a 9 speed cassette didn't fit at all – though the splines on a 9 speed cassette wouldn't fit on those either. Deliberate incompatibility which doesn't exist any more, but the feature is retained on cassettes so that they all work on that generation of hubs.
As regards the spacer on Mavic hubs, that's mainly so that you can use a Campag spaced cassette (which is wider). Presumably it's easier for them to use the same cassette body on all hubs rather than have something different on their MTB hubs where there's no particular need to use a Campag cassette.