The phrase 'they had been waiting' is an example of the past perfect progressive tense, which emphasizes an ongoing action that occurred before another point in the past. This construction combines the auxiliary verbs 'had' and 'been' with the present participle 'waiting,' highlighting both the duration of the action and its completion in relation to another past event. It provides clarity regarding the timeline of events and showcases how past actions can connect to one another.