Actually these libraries are used by third-party clients on platforms that Whatsapp doesnt officially support such as webOS, Firefox OS and others. Its not about spamming, its about being able to offer a decent client on platforms that are not covered by official clients.
Does the library enable the service to be used on more platforms? Yes. Does the library enable spammers to abuse the service? Also yes. It's not an either/or situation.
A library is just a tool, like a hammer, you can build a shelf with it or hit your neighbor. anyway, you don`t solve that problem by banning hammers....
It was mostly used by websites offering a web based chat interface for WhatsApp and by spammers.