“Big Data” is a wonderous thing - person A is known to be interested in hernia surgery and jeeps, and person B is known to be one of their contacts, so when person A and B are near to each other it can be inferred their conversation included those topics, and it’s the best time to show person B adverts.