Google isn't following you, they're just in every store you walk into no matter what.
Imagine almost every store in your city installed something facial recognition (a la Amazon Go). This system, given to owners literally for free, was created by one company - Google - and allowed them to automatically see what products most people were looking at, what time they were doing so, and their demographic. As payment, Google also gets this data and is able to use it for their means.
Note: i'm just making this analogy. Google Analytics (probably) isn't being used for ad targeting.