Recently I switched from IMAP to POP. After connecting to GMail, the GMail server downloaded months of emails to the local computer. I believe the download was started from the date when I switched from POP to IMAP.
Eventually I had to reset the POP settings to stop it. I am curious how GMail keeps track what had been downloaded. I can’t see any special flags or the like.