As an AdSense Product Manager for ads quality, I’m part of a group that works to make the ads on your site relevant for users. One of the ways we do this is through contextual targeting, which matches ads to the content of your webpages.
See the article here:
Inside the science of contextual matching