To trace contacts of the deceased person. For an elder person, it's likely he/she has interacted with other elders, and it's good to check.
Compared with testing a healthy young person who is asymptomatic, it's better to test the dead one.
Edit: but healthy people with some suspect symptoms should of course remain isolated.