It is a combination of factors, which varies per person. Nostalgia, yes. It is a way to stay connected to a childhood hobby. Sheer entertainment value. Interest in imaginary lore and, perhaps--if you use them this way--inspiration for your own creative pursuits. And of course actual RPG usage, but I think you are talking about "everything else."
But there is a another side, too, which has to do with consumerism and material possession. We like to own things -- and this goes beyond mere "collectoritus." We are inculcated from very young to buy, buy, buy. We really don't need or even benefit in any meaningful way from 95% or more of what we own, and I'm not even going into the global impact of consumerism.
On a personal level, I have found myself, more and more, resisting the urge to buy the latest 5e book, or random RPG books, just to have them on my shelf. Like you, I don't read most of them - I just skim them every so often, maybe read a passage here and there, but then they end up gathering dust. I have a similar problem with books in general, although have toned it down over the years.
I'll share the experience I had recently with the Eberron book. As a casual-to-serious fan of ttrpgs, but not truly hardcore, my interest has waxed and waned over the decades. Even in the "waning phases," I have continued my purchase of selective RPG books--mostly setting/lore stuff. Right now I'm in a waning phase: that is, I am not in a group or looking for a group (just a lot of other stuff to focus on). I bought the Avernus book, and the new Pathfinder world guide, but have barely skimmed them. I was planning on buying the alternate version of Eberron as I love the cover, but while skimming it in the FLGS, I asked myself, "Do I really need to spend $20 more on a cover? Do I need to spend money on this at all, just to shortly gather dust?"
So I didn't buy it. And I probably won't be buying any RPGs for awhile now, not unless something really piques my interest or I re-enter a waxing phase.