This is an actual cultural practice in some parts of the world.
Endocannibalism - Wikipedia
Herodotus (3.38) mentions funerary cannibalism among the Callatiae, a tribe of India.[3]
It is believed that some South American indigenous cultures, such as the Mayoruna people, practiced endocannibalism in the past.[4] The Amahuaca Indians of Peru picked particles of bone out of the ashes of a cremation fire, ground them with corn, and drank as a kind of gruel.[5] For the Wari' people in western Brazil, endocannibalism was an act of compassion where the roasted remains of fellow Wari' were consumed in a mortuary setting;[6] ideally, the affines would consume the entire corpse, and rejecting the practice would be offensive to the direct family members.[6] Ya̧nomamö consumed the ground-up bones and ashes of cremated kinsmen in an act of mourning; this is still classified as endocannibalism, although, strictly speaking, "flesh" is not eaten.[7] Such practices were generally not believed to have been driven by need for protein or other food.[4]