I'd say that
most of the distinction between books and blogs / other online writing is about the
process and
result rather than of the physical form of the product itself, though that has some bearing (see my recent comments elsewhere in this thread).
If you're familiar with the literature on writing itself --- fiction or nonfiction --- what becomes clear is how books are crafted. There's the idea, often research, organisation of notes and the like, writing itself, and then very often many, many, many rounds of editing and proofing, which go towards a result which ideally reads well, is factually accurate (where such things matter), that educational materials follow good pedagogy, is well cited and referenced, has needless fat trimmed, etc., etc.
Traditional publishing has multiple edit and filter points, from initial acquisition through revisions and translations. The upside is (potentially) well-crafted works, the downside is that many proposals don't get green-lit. The promise of the Web was breaking that editorial chokepoint, which has its own pros and cons.
Yes, of course it's possible to craft bad books, and as The Good Book notes, there is no end.
But blogging and article-writing frequently cuts many of these corners. Yes, a domain-expert can write a good blog, and yes, the process of blogging itself can be part of the process of book-creation, with feedback and corrections to the (error-prone, roughly-hewn) blog posts itself contributing to that finished product.
Books based on dialogues, lectures, commentaries, and essays are also a timeless form (Plato, Sun Tzu, Al-Kindi, Averroes, Smith's The Wealth of Nations, Feynman's Physics, all come to mind), and that's one useful way of coming up with a book-length compendium of material, though the result may lack in an overall coherence. (Overall coherence of course is not the principle goal of such compendia, rather, it is to create a usefully-curated set of realated or interacting works.)
I've been increasingly disappointed in the focus of many early digital-text pioneers on creating an end result that's specific to the domain, rather than on the process of writing works which is afforded by digital tools to increase capability and usefulness of something which, after all, ultimately is read in a linear fashion, if not necessarily how the author or publisher lineralised it. Reading is finding a path through text, the presented structure is itself only one path. We read novels through; we work through textbooks; we consult or query dictionaries, phone directories (if you remember those), and encyclopedias.
Concepts such as Niklas Luhmann's Zettlekasten, whilst analogue and paper-based are far more innovative in the sense of restructuring the authoring process itself. More modern tools would include Zotero and Calibre, perhaps.
https://zettelkasten.de/introduction/>