Beowulf asks Wiglaf to build him a tower as a tomb to signify that he, Beowulf, was the greatest warrior of all time.
He was still himself,
Alive, aware, and in spite of his weakness
He had many requests. He wanted me to greet you
And order the building of a barrow that would crown
The site of his pyre, serve as his memorial,
In a commanding position, since of all men
To have lived and thrived and lorded it on earth
His worth and due as a warrior were the greatest.
Beowulf's life was marked by feats of heroism. Even in death, he was a hero—defeating a dangerous dragon that his own warriors ran from. His tower will serve as a legacy to his memory, even as his nation is taken over by outsiders.
Beowulf wasn't only the king of his people. His strength and reputation as a warrior kept the Geats safe from invasion by foreign people. They're aware of their own vulnerability at his passing, which contributes to their grief.
They do build the tomb. The poem says:
Then the Geat people began to construct
A mound on a headland, high and imposing,
A marker that sailors could see from far away,
And in ten days they had done the work.
It was their hero’s memorial; what remained from fire
They housed inside it, behind a wall
As worthy of him as their workmanship could make it.
And they buried torques in the barrow, and jewels
And a trove of such things as trespassing men
Had once dared to drag from the hoard.
They let the ground keep that ancestral treasure,
Gold under gravel, gone to earth,
As useless to men now as it ever was
Beowulf is gone, but his legacy remains and will be seen by everyone who passes his resting place. His people celebrate him at his tomb after they finish building the tower—but the celebrations and tales of his bravery are marked with weeping.