This sounds like a hilarious ye-olde prank of pulling your jacket over your head and stumling around trying to scare people but getting bored and wandering off when they didn't react lmao
And one more thing, this was in the days when capital punishment was still in effect, but with a growing opposition from the humanitarian, enlightened liberal bourgeoisie. And a story about how a decapitated criminal is haunting arbitrary pedestrians does fit that agenda. All subconsciously construed of course.