I work in marketing and deal with corporate level "big data" on a daily basis.
Much of it is based on your location. Let's say you're in the supermarket. You walked by a shelf full of products, and your phone location data confirms this. That's cross-referenced with all of your available data: age, income bracket, sex, marital status, family size, postcode, purchasing history. It's also cross referenced with the available data on people you spend time near on a regular basis - friends, partners, spouse, children, colleagues. After a while it starts to triangulate all of this (plus any browsing data, etc.) into a buyer persona -- so when you walk by that shelf full of things, the device's location data confirms this, then the ad service shuffles through the advertisers and serves you the ad you're most likely to click on based on all of that information.
That's how it feels like you're thinking about a product and then suddenly it appears on your phone. Chances are you walked by it at some point in time and the ad service has decided now is the optimal time to serve you that ad to make it most likely that you'll click - and they'll get paid.
I've had a few of these recently - yesterday, it was a very particular brand of sausage that I KNOW I haven't thought about and that is, in fact, produced in another country and very hard to obtain.