A dervish is a Muslim monk who is part of an order known for their wild ritualistic movements. A dervish's whirling is part of their religion.
A dervish is a Muslim holy man who, like a monk, lives a simple life away from the temptations of the world. The marvelous thing about this form of asceticism (it does involve poverty and chastity) is that dancing, whirling, or howling is also permitted, depending on the kind of dervish you are. Some forms are still practiced in the Sufi sect of Islam. This is the source of the term whirling dervish, which can apply to anyone who spins.