Phones abaolutely do listen, but not to audio via the mic. When Apple and Google tell you they respect your privacy, they mean they don't harvest data directly from a live feed of the mic nor camera; they still scan your files in some cases, and they harvest your browsing history, and read your text messages metadata, and check your youtube watch history, and scan your contacts, and check your location, and harvest hundreds of other litttle tiny data points that don't seem like much but add up to a big profile of you and your behavior and psyche.
So your friend was at a pub quiz with a couple dozen other people, and his phone knew where he was and who was nearby. A statistically significant portion of the people there were not privacy conscious and googled "Lord of the Rings runtime" or something similar. All that data got harvested by Google and Apple, and processed, and then the most recent and fitting entry from some master list of customers' sites' articles was pushed to all their newsfeeds.
Humans don't understand intuitively how much information is being processed through nonverbal means at any given time, and that's the disconnect large companies exploit when they say misleading things like "noooo, your phone isn't listening to you."
But it's totally not privacy invasive, because at no point along the line did a human view your data (/s)