If you are using Gmail, I’m sure you have read their T&Cs that allows the company to automatically scan your emails for keywords so that it can serve you ads accordingly. Google recently updated their T&Cs last year. It says:
"Our automated systems analyse your content (including emails) to provide you personally relevant product features, such as customised search results, tailored advertising, and spam and malware detection. This analysis occurs as the content is sent, received, and when it is stored."