When a person is hanged, they twitch uncontrollably, especially if their neck is not broken by the initial drop. These movements were called the gallows dance because of the funny movements of the arms and legs. It used to be quite the family event to come and watch a corpse dance on the gallows.