Developer time is expensive. Allowing devs to focus on the core-product instead of CMS infrastructure is a big time/money saver. This is the value prop for most all API-first services: Stripe, Twilio, Algolia. Why would you build your own "free" payments processing / telephony / search service when these focused services have done a really good job solving the problem for you?
Wordpress is "free" vs CosmicJS is 49$/mo minimum without backup and only 3GB space.
For 49$/mo you could get a cloud VPS for Wordpress, including backups and even high-availability with no request limits (API limits in CosmicJS).
I know it's not straight comparable, but..