You can stop this from happening, but you'll need to be quick about it. One way to prevent this from occurring is to actually delve into the new terms of service. Rather than just clicking "agree," hit "read more" and then uncheck the box that says "Share my WhatsApp account information with Facebook."
Even if you hit agree without checking what changes, you can still opt out by going to the app's settings menu and going to the account tab. Then uncheck the box that says "Share my account info."
WhatsApp has said that this info won't be shared with or sold to advertisers. It instead says that the new policy will help you find friends and "improve your Facebook ads and products experiences."