My understanding is that this was the ultimate penalty, imposed for treason against the Emperor, in the old Chinese judicial system, which had a series of graduated penalties for various offenses (also ranked in order of their seriousness), ranging from garrotting to quartering to the 1000 cuts, which was to be sliced, cut and sawed gradually into small pieces. Part of the penalty, besides the slow agonizing process was that the body was not intact, which meant that the victim could not enjoy a future life. Hence, beheading, while quicker and less painful than garotting, was a heavier penalty. Info on the judicial system, which is fascinating, is plentiful in the Judge Dee novels and stories of Robert van Gulik.