Since iOS 11 (I believe) the "keychain" persists across app reinstalls. Shitty apps thus put a tracking ID in there to guard against app reinstalls.
If you reinstall your entire device (thus clearing the keychain) you should be able to break the link.
There's also the issue of App Groups, which means that apps from the same developer (Facebook) can share data between them, so if you have Facebook or WhatsApp installed along they can all talk together and figure out what your other accounts are.