The structure 'had been + verb-ing' represents the past perfect progressive tense, which indicates an action that was ongoing in the past before another action took place. It emphasizes the duration of an activity leading up to a specific point in the past, connecting earlier events to later ones, and provides a sense of continuity and progression.