That is my point. I love Gatsby.js, it already can generate static website from a variety of sources. Most developers like to write content in markdown (as you mentioned), and probably check into git, and Gatsbyjs already can generated pages directly from your repo. Why cosmicjs?
I can see advantages of headless API driven CMS (like CosmicJS or Contentful , after all I love APIs, lol. :)), where like an Ecommerce website, where there is a lot of content with frequent changes (made by non-technical people), and of course you wouldn't want to regenerate all the static pages when you change a description or something for a item for sale. But I just feel using it for documentation feels overkill and expensive.