I think the conceit descends from the earliest novels (of like the 1600s), which usually justified their own existence by being recovered documents: Robinson Crusoe, Don Quixote, &c. This way of creating verisimilitude drops out of a lot of texts as the novel becomes the dominant mode of literature-- because you can take it as a given-- but persists in more fantastic fiction, I think for the reasons already stated. Tons of proto-sf takes this approach: Frankenstein is a letter about someone else's narrated story, The Last Man is framed by Mary Shelley finding the events scribbled on a cave wall, The Mummy! is a vision in a crystal ball held by an angel(!), The Purple Cloud is based on notes dictated by a man in an insane asylum. All of these explain how stories of the future could "really" be told.
It's also still present in some realist novels in the 19th century, though; for example, the narrator of Adam Bede has asides about having talked to and hung out with Adam and friends.