They don't as much share info as live off the same ecosystem in your phone. Regular users, who don't actively block their FB apps from accessing their phones in depth, will store Whatsapp contacts on their phones, which in turn are read by the FB and/or Messenger app. Since neither knows the context, it just assumes its a new contact and show you info accordingly.