git sparse-checkout only controls which files are written into the working tree. The full object database, every blob of every historical version, is still fetched and stored in .git. Teams adopting sparse checkout to speed up a monorepo clone are routinely surprised that .git is unchanged in size.
To actually reduce transfer, combine it with a partial clone: 'git clone --filter=blob:none --sparse URL' fetches commits and trees but downloads blobs lazily on demand, then 'git sparse-checkout set dir1 dir2' limits the checkout. Confirm the filter took effect with 'git config remote.origin.promisor', which should read true, and 'git config remote.origin.partialclonefilter'.
Also note that since Git 2.37 (June 2022) cone mode is the default for 'git sparse-checkout set' and the 'init' subcommand is deprecated in favour of 'set'. Cone mode matches whole directories and is fast; the older non-cone mode takes gitignore-style patterns, is much slower on large repos, and now requires an explicit --no-cone.