That it's very creepy aside, I am wondering from a technical standpoint how they do that including the speed that it happens.
- I talk about something with friends, for example a pair of new shoes. I never search for shoes online and never online ordered. Next time I open instagram I get ads for new sneakers.
- I talk with a friend about depression and mental conditions, next thing I get ads for a new online counseling app.
This happens with friends using both Android or iOS. We are not on the same wifi network and don't talk about these things online through messengers. I don't have facebook installed (but have instagram and messenger). I am a somewhat cautious person and besides very rarely checking instagram or replying to messages barely open either app.
One theory is that someone at a later point searches for it online and through GPS approximation and social graph the network makes the link back to me. But besides that I have no clue. Always listening through microphones is a far stretch especially given security models and APIs on iOS.
The chance of such alignment may be significantly higher than our intuition says, a bit like the birthday paradox counterintutively has a >50% probability of happening.