I've recently created a group on Facebook. Subsequently when I insert my cursor to the search box to insert new people a dropdown comes in and proposes some people. Are those people proposed because they showed some interest on my group or is it because I spoke to them recently? Which is the criteria of these suggesting people?
It is up to engine's logic. And no one will tell you exactly how it works, because that's company's policy. I think there a lot factors included. You can start read about machine learning.