Contrived example: I search for "buying new SUV" so clearly you should show me new car ads and car buying articles and reviews. But if I am a mid-30s married person, you might also try to sell me car seats for the babies I demographically am likely to have or want to have soon. OTOH, if am an older 60s retired widow, you may want to advertise warranty and car maintenance plans for my peace of mind about taking care of the car.
Actually it's a little more nuanced than that, because I could be mid-30s and married but choosing to be childfree, or I could be a 65 year old widow and former car mechanic who is more than capable of taking care of my own vehicle. So collecting the demographic data is about building a gradient of probabilities, things that are ranked in likelihood of value/relevance, and using that information to inform the demand side of advertisers deciding how much to bid for my eyeballs.