WhatsApp has changed its group settings to include "everyone" by default so people you don't know can add you to a group. These groups could be spam at best or scams at worst.
You can change its default settings as follow:
1: Go to WhatsApp
2: Go into Settings
3: Go to Account
4: Go to Privacy
5: Go to Groups
6: Change from (Everyone) to ( My Contacts)