Because she dies long before the story is completed, the essential information that Rosanna reveals cannot be told directly; many of the novel's parts are told from a first-person perspective, from the characters themselves, but Rosanna cannot, and furthermore she is not considered important until later. However, through the literary device of an epistolary letter, Rosanna's words are shown:
"If you are curious to know the meaning of my behaviour to you, whilst you were staying in the house of my mistress, Lady Verinder, do what you are told to do in the memorandum enclosed with this..."
(Collins, The Moonstone, gutenberg.org)
Epistolary novels were common during the time of writing; it gives the reader a sense of immediacy to think that he or she is reading words from a real person, and writing a story as a series of letters gives the story a more truthful feeling. In this case, Collins used the letter as a device of his mystery story; since the character is dead, no one can know her information until the letter is delivered; since the deliveree is out of town at first, there is suspense until it is finally opened and read.