We went through a lot of thinking and research with regards to this as well. It boils down to a few things
Learning curve :- Erlang, along with the XMPP protocol are well designed for messaging, but have some learning curve. Where as for Socket.io, the learning curve is next to nothing and you can implement something quickly
Scale :- I think it depends on where you are in your journey. Node & Socket.io work pretty well. So if you want to get up and running quickly, I think they are a good choice. Our understanding is that it can support you for quite a while. Once you hit massive scale, then you can perhaps rethink these.
Availability of resources :- Granted whatsapp was built only by a few engineers, but they had to customize a lot of things, and again, they solved for those things at scale. It required engineers who know erlang and if you can't scale your product development, how will you scale your product? I don't know for sure but perhaps there weren't too many alternatives then.
Here's one other technology we've been keeping an eye on but haven't really seen too many people talk about it for chat applications - MQTT. It's used for IOT, has a light weight header which is what makes it appealing, and can do pub/sub. There are examples out there of using it with Node as well and it offers clients for IOS and Android. You'll need a broker for it as well.
We chose node and socket to get things going and later on we may look at erlang or mqtt or whatever else is new. If you get going with mqtt please let us know too. We'd be interested :)
Lastly, we haven't looked at some of the other technologies mentioned in this thread but the 3 I have mentioned were the ones we looked most closely at, because they seemed to orient well towards messaging.