If it seems like too much of a coincidence, then it is.
Presumably your friend ordered the socks online, and his identity has been linked to yours, via email, messaging or phone number hence it will know what brand of socks.
Chances are a lot of his friends are also getting the Stance adverts...