Offering dozens if not hundreds of hours of gameplay in the base game alone, The Elder Scrolls V: Skyrim is certainly not intended to be a game for those who want to run through and save the world in an afternoon. Sure, such an option is available for you if that's how you want to play, but there is so much that you can miss by doing so. Interesting NPCs, wondrous locations that are hidden inside seemingly innocuous caves, and the secrets of some of the more major factions in Skyrim are just some of the things that can be found a bit off the beaten path, giving the world a more lively feeling.
Of course, there's a lot more to Skyrim than just a bunch of random bandits hiding out in caves. As one can imagine, commoners had to entertain themselves somehow, which, obviously, meant that books were fairly common objects. While virtually every modern RPG has books for the purpose of both immersion and world-building, Bethesda went a bit above and beyond, creating hundreds of books about all sorts of topics from religion, to plays, to historical accounts of things both magical and mundane, to a couple of pieces of high-fantasy erotica filled with all sorts of sexual innuendos. That's right, someone at Bethesda was presumably paid to sit down and write a short story about flirting with an Argonian (a reptilian humanoid) maid, and for the sake of not having a strange Google search history, we can assume that this kind of literature is more or less exclusive to The Elder Scrolls series. The best part is that these books are physical items that you can pick up in the game, put on a shelf that you built, and read, unlike in some other games where your character evidently tears out the pages and stuffs them in their million-page journal.
Now, you may be asking why would Skyrim's literature matter. After all, it would be a safe bet that of the millions and millions of people who played Skyrim, only a very small percentage of them actually noticed that books were an actual thing that you could pick up and read in the game, and a small percentage of those people actually took the time to read one or two of the books. For a game series like The Elder Scrolls, though, backstory is everything, and the more ways you can expose people to the lore and get them invested in the story, the greater the chances of them turning into repeat customers in the future. Even a game like Destiny gave people the option to go around the world and search for things that would increase their understanding of the backstory, albeit in a very poorly implemented manner that drew no small number of complaints from members of the game's audience.
Similarly, games like Halo, Gears of War, StarCraft, and Diablo, among many others, have real-life books that are, once again, presumably intended to get people invested in the backstory. If you wanted to, you can also purchase a collection of all the in-game literature that is present in the more modern Elder Scrolls or Dragon Age games, which goes to show that not only is there an audience for such things, but that some developers and publishers deem this to be a fairly profitable venture; it would be safe to assume that they are not doing this purely out of the kindness of their hearts.
At the very least, you can think of Skyrim's various books and journals as a form of in-game decoration. Sure, you could remove every single book in the game, as they don't exactly help you fight off dragons or kill giants, but you could extend that line of thought to everything in every game that doesn't have a practical effect on gameplay. For example, Blizzard could've just opted to not decorate any of their Overwatch maps with a variety of monitors, billboards, posters, picket signs, graffiti, and so on and so forth, as they definitely don't help your insta-lock Torbjorn contribute more to the game, but it gives the maps a sense of uniqueness and diversity. So too does Skyrim's in-game library contribute to making the game feel more complete and "authentic"; without such a library, not only would the world feel like it is missing something (especially the College of Winterhold and Apocrypha), but it would also be a rather odd omission from a franchise that is known for having a rich backstory.