Because books that speak of other books are just so much cooler.
No really, it’s always really nice when a written story includes passages from literature within that world. It may be a bit cheesy, and easy way to allude to depth that may not even be there, but if you do it well it’ll definitely pay off. It’s a great way to show your world has more going on in it, many more things taking place than what your usual perspective shows. It gives glimpses into other people, other stories, past events. Definitely versatile!
I wonder though, how an entire encyclopedia or other kind of collection would do. Would there be an audience that likes piecing together a world and its lore from a database of information, rather than a single path? Plain fictional Wikipedias may lack emotion, but nothing’s stopping you from compiling a collection of letters written by key figures instead.
There’s lots of neat things to try there. But making a large enough data-dump to have things be understandable is an enormous task.