Digression (getting off track) is used in a stylistic way to weave themes together into a leit motif, to enhance character development, and to heighten suspense through anticipation:
The action of Beowulf is not straightforward. The narrator foreshadows actions that will occur later, talking about events that are yet to come. Characters talk about things that have already happened in the poem. Both narrator and characters recall incidents and characters outside the poem's main narrative. These "digressions" (see Style section below) are connected thematically to the main action. Critics once saw the digressions as flaws. The poet, however, was consciously using them to characterize human experience, stressing recurring patterns, and to represent the characters' attempts to understand their situation (see Themes section below).
- from enotes, Beowulf, 'Summary'