git gc runs automatically when some threshold is met in the number of "loose" objects (objects that were created by e.g. git add and that haven't been packed yet). I don't remember what the threshold is, though.
I believe loose objects are also packed when pushing to a remote or fetching from it. I wonder if the remote's .git folder is also about 3 MB in size.
Indeed, the git protocol exchanges packs.
did it have binary data? if so try moving to lfs and running bfg cleaner and watch it shrink even more
No binary data. Just an ordinary git repo with a bunch of source code files (mostly C and Lua).
thats even more impressive really, reckon decent history and never pruned before