Historically, it was because witches were believed to have sexual congress with the Devil at their Sabbat, so they would dance naked around a fire in celebration and communion before commencing with the orgy.
I don’t think real witches ever actually did so, but it paints a very titillating picture for the sexually repressed Puritans to drool over, does it not?
In modern times, it has become a symbol of body positive feminism and freedom of expression for some neo-pagans and Wiccans to sometimes do so.
Dance itself, however, has always had a spiritual connection, particularly in pagan beliefs, but also in some early Christian sects, before it was deemed “sinful” by the Church and suppressed, along with any sort of sexual expression.
In the animated movie The Prince of Egypt, there is a great scene where Moses, after being driven out of Egypt, comes across a desert people who dance in celebration of life and God.
In the Bible itself there are numerous references to dancing:
Ecclesiastes 3: 4 : [There is[ a time to weep, and a time to laugh, a time to mourn and a time to dance.
Psalm 30: 11: You turned my wailing into dancing. You removed my sackcloth and filled me with joy
Psalm 149: 3-4 : Let them praise his name with dancing, and make music to Him with timbrel and harp.
Jeremiah 13: Then the young women will dance and be glad, young men and old as well. I will turn their mourning into gladness; I will give them comfort and joy instead of sorrow.