The entire directory (not repo) and all repo history regardless of secrets or instructions otherwise is not needed for faster cache access. I'm not going to say that this was intentional exfiltration. Sneaky motivations are not needed for this to be a bad idea and a horrific implementation.