I believe is a by doing a number carrier lookup. It will tell you if it belongs to any actual carrier or an app.
You don't even need the app. You can use what's app web and it does the basic things. Probably the app has some extra features that you won't need if you are just using it for texting.