They could get pretty good targeting by the type of app the ad is used in as well. Although this is still on a completely different scale and more like how Amazon can give book recommendations based on previous purchases.
It's still basically the same thing, which is the point I'm trying to make here. No one can avoid being used for advertising these days. You go into an online store and buy something, you're leaving data that will be tracked and used to sell you and other people with similar tastes more products later.
Apple does it. Amazon does it. MS probably does it. Google does it. The only difference is Google spreads a wider net.
They are still based on assumptions, they don't know the eyeballs behind the screen. I know of Nielsen ratings, which is why I mentioned market research, a targeted ad doesn't mean that the user is directly mined. An assumption does not mean random.
They don't know the eyeballs specifically, but they do know they belong to a male or female between the ages of blah and blah, who tends to like so and so. It's more than an assumption, less a detailed schematic of your personality and lifestyle. Pretty much the same as what Google has on you.
Think of it like this. Google only knows exactly who you are when you're using your account to sign into one of their services. They know you're Subsonix while you're using Google Maps. If you use Google Maps to launch beyond their services, you no longer have a name attached to you. You're a nameless blip on a radar, with some demographic information attached to it. In other words, you're no longer Subsonix to them. They lost track of your name as soon as you walked out the doors. Now you're just a random grey dot, male, age twenty-something floating around a huge map. They don't know where Subsonix went, but they can track this male, age 20ish dot around to see what it visits, what it buys, and where it goes.
Google then uses this information to gather demographic information. Hundreds of thousands of other male, age 20ish dots tend to go to tech websites, and usually link off tech websites to certain other websites. That's some nice information to have. They can go to an advertiser and say "hey, we know about a group of people who'd love your product. Pay us a million billion trillion dollars, and we'll advertise your product to them". They do it, and since you're tagged as a male, age 20ish dot, you'll see that advertisement.
This is the part that concerns people, but it's all a bunch of hooplah and ado about nothing. They don't know you as Subsonix. That name is just a guy signed up to Google accounts to them. What they know you as is a generic, completely anonymous, and totally nondescript point who likes certain things.
It's like Google is a guy standing on top of a large building, looking down on a crowd of people wearing blue shirts or red shirts. Blue shirt people like pie. Red shirt people like cake. They're too far up to make out any faces, so all they can do is shout "HEY BLUE SHIRT PEOPLE! PIE HERE!".
It's about the most benign thing in the world. I mean sure, the possibilities and implications are kinda creepy. Knowing you're being tracked, even completely anonymously can give some people the jibblies. But the reality of it? It's pretty boring.