It’s a test to find out if the corpse truly is deceased...
The Irish invented that.
Called a wake
If one can ‘sleep’ through all the music, shouting, fights and freshly opened booze they can put one in the ground.
When that time comes around, the revelers will not care if the party dead or not.
(Im an O’C say it ain’t racist)