When you open a message in Gmail, you often see ads related to that email. Let's say you're looking at a confirmation email from a hotel in Chicago. Next to your email, you might see ads about flights to Chicago.
But sometimes, there aren't any good ads to match to a particular message. From now on, you'll sometimes see ads matched to another recent email instead. For example, let's say you're looking at a message from a friend wishing you a happy birthday. If there aren't any good ads for birthdays, you might see the Chicago flight ads related to your last email instead.
To show these ads, our systems don't need to store any extra information -- Gmail just picks a different recent email to match. The process is entirely automated: no humans are involved in selecting ads, and no email or personal information is shared with advertisers.
Source: Serving better ads in Gmail