The story is narrated in the past tense. To refer to a time in Elizabeth's past, earlier than the time of her writing of the letter, the narrator uses the past perfect.
Elizabeth was determined to keep up their correspondence, but her determination was motivated by the relationship they had enjoyed in the past, not by the nature of the relationship at the time of her writing.
The word "it" in the bolded phrase refers to Elizabeth's determination to keep up their relationship: she was "determined not to slacken as a correspondent". The pronoun does not have an explicit noun antecedent here.
Consider:
He drove to the train station despite the blizzard. It was because a
friend's car had broken down and he was stranded at the train station and needed a ride.