The Castle Dancing Troupe are a group that once served as the Dancing Trope for the Ikana Royal Family.
According to a Gossip Stone, the ReDeads found in the Ancient Castle of Ikana are actually the reanimated corpses of the castle's dancing troupe. If Link wears either the Captain's Hat, Garo's Mask, or Gibdo Mask the ReDead will dance around as they once did in life instead of attacking him. Link can then either simply pass them or kill them easily without opposition.
It is presumed they all died at some point during or after Great War of Ikana.
Response to Garo's Mask
Interestingly, they will dance even if Link wears Garo's Mask, which is odd considering the fact that the Kingdom of Ikana was at war with the Garos. However this may be due to them considering Link to be one of the undead and thus do not see Link as a living source of sustenance. Another possibility was the war was unpopular with members of the Troupe, who may have secretly hoped for a peaceful resolution to the conflict and retained that hope even in death, thus explain that their dancing is their attempt to welcome the Garo (Link) to make peace with Igos du Ikana.