Ghosts in the underworld collect souls, so there is a saying that "the king of hell told you to die in the third watch, but you can't stay in the fifth watch." But this time they just asked for a name, indicating that your grandfather is not the kind of person who was taken away directly by bad luck. They must have been blessed by-(whatever your grandfather believes, say which Buddha, if not, say ancestors)-,so they can only take their names, which also means that grandpa is lucky and will live a long life (he died once).
The Monkey King in the Journey to the West and Xu Xian in the Legend of the White Snake are all blessed people who came back from the underworld, so your grandfather is also blessed.
Come on, I wish your family harmony.