the thickness of 10 sprockets is less than 8 speed or 9 speed and the space between the 10 speed sprockets is less.
Total overall width of the 10 speed is less than 8 or 9
10 speed cassettes will fit to any 8 , 9 or 10 speed freehub but you will need to put a thin washer on first for 10 speed on an 8 or 9 speed freehub as yenrod says otherwise the locknut won't tighten the cassette sufficiently and it will still be slightly loose because an 8 speed or 9 speed freehub is slightly wid than a 10 speed phew !