The past perfect tense is used for an action already completed by the time of another past action or for an action already completed at some specific past time.
Writers sometimes use the simple past tense when they should use the past perfect.
The building of the cabin and the flooding of the quarry both occurred in the past, but the flooding was completed before the time of building.
The past perfect tense is needed because the action of leaving was completed at a specific past time (by the time dinner was served).
Both the arriving and the meeting ocurred at the same time, so the past tense is correct in both clauses.