The Pious and Evil Corpse
The Prophet (sal Allahu alaihi wa sallam) said, “When a dead body is placed on a bier and men carry it on their shoulders, if he was a pious man, it (the corpse) says: ‘Take me in haste.’ But if he was not righteous, it says to its bearers: ‘Woe to it. Where are you taking it?’ Everything except man hears its voice. Had a human being heard its voice, he would have surely fallen into swoon (lost consciousness).”
Only Allah knows the reality as to how a dead body speaks. However, no improbability is involved in this matter. Allah is empowered to let any dead body speak if He so likes. We must believe it on the authority of authentic Ahadith.
And Allah knows best!