bitcoin core RPC vs bitcoin libraries
In simplified terms...
Libraries work more like a calculator that simply process the data you feed it.
The JSON-RPC API can not only process the data you feed it, but also gives you access to the data you need.