Dancing at a time of joy is similar to the forbidden Shabbat labor of meraked—sifting. Sifting separates the food from the waste, or vice versa. Similarly, dancing separates physicality from the soul, until one reaches a state of transcendence beyond the physical.
(Chiddushei HaRim)