Gmail has always scraped emails. That was in the TOS from day one. Your data was the price for the free service.
They stopped doing that in 2017.