The author includes this information in the exposition in order to (B.) remember the famous story of a popular hero.
In Beowulf, Scyld Scefing is presented as the founding king of the Danes but also as an ideal ruler and a legendary warrior. Moreover, in the story, Scyld is Hrothgar's great-grandfather. He is part of the exposition due to his achievements and the power he gained throughout his life and also for the legacy he left to the Danes. Scyld Scefing is remembered because he was a good king and a fearless hero ("he terrified warriors").