All this has nothing to do ROI, which measures the return that a single entity gets from an investment they make. If you want to make the ROI analogy work (which I don't think you should) one way to do it would perhaps be to compare the time invested with the amount of people the writer reaches. In that case the "ROI" of any method of writing could be super low (if nobody reads it) or super high (if everyone reads it).
Another way to look at it would be that the time to read something you cite is actually the amount of "investment" by a reader. In that case I expect that many readers experience zero return (or even negative return) on their investment of 30s to read an internet post, while they may experience incalculable, life-changing return from 8 hours spent reading a book. Or, probably less often, vice versa.
If I want to learn about, I dunno, the ancient Maya, I can go ahead, book a trip to Mexico, go to all the museums, get my hands on the primary sources, etc. This process will take some amount of time, likely years. Im not talking about the knock-on effects, very great as they are, just the pure knowledge.
Or I can grab a few books and use the authors' time and effort. This will take some number of hours, maybe days. But not years.
Such books are a much better use of my time to learn about the Maya than reading NatGeo articles (though still good), or some blog posts (alright in quality) or a bunch of internet comments (still, maybe good here and there). Yes, of course it's a mesh of all these things. But I believe that well researched content (mostly that still means a book) is the best 'bang for your minute' that you can get.
I'll put it this way: I'm trying to invest some limited amount of time in learning more about something or enjoying my time fruitfully. With what little time I have, the best way to learn more about something is (typically) via a book. Enjoyment, sure, it varies more, but books tend to be more, I dunno, rich (?) in a way.
Blog posts give you 4 hours to write, backed by years of life experience, probably based on things you've had on your mind for a while.
Magazine articles pay you to write what the audience/advertisers want to see. They've got to be a net negative, convincing someone to write when they didn't necessarily want to, to say something they didn't necessarily want to say.
Books are an item for a CV or resume, and a status symbol. Sure there are respected textbooks, but there are a lot of worse books out there than respected textbooks. Look at "Why we sleep" recently - years to write, torn apart by one blog post. Look at bestseller lists rigged by false purchases. Look at tech books where writing a book on a language or tech stack is almost more of a status grab, or at worst a "teach myself $thing by writing a book about it" than a long standing tome.
(Also, 8 hours to read a book??)
An expert can take 5 minutes to write something that is far more valuable than an amateur can write in years. I'd also argue that it's much easier and common for amateurs to write books nowadays, so it's becoming less and less good of a heuristic to say "books > blogs, articles, etc"
Internet comments take ~5 minutes to write, 30s to read (6x ROI).
Blog posts are ~4 hours to write, 10m to read (24x).
Magazine articles are ~3 months to write, 30m to read (960x).
Books are ~5 years to write, 8h to read (1300x).
Obviously, books are one of the best reading ROIs. Now, of course, you've got to balance the book quality, your interests, the thesis, the author's biases, etc. But as a rule of thumb, books are good investments of time. I think that's why they are this 'rare alchemy'. It's not that you unlock cheat codes to life, it's that they offer some of the best kismet to doing so.