There have been philosophies that see a dualist world where we live. Everything is either good or evil, there is not neutral.
In some branches of Christianity, both in the early Church, and in the Post Reformation faith communities, these philosophies either develop again or are resurrected.
I used to think of these concepts as “Puritinism” but that term rightfully belongs to a movement at the time of Oliver Cromwell which was in not way so extreme.
The basic concept at it’s worst is that the Flesh and the Material world are inherently corrupt, and only the spirit is of God. (one example from the early church was Manicheism and some other forms of Gnosticism)
As such anything that is pleasurable to the earthly person is evil. only Prayer and the transcendent are good.
Some sects went so far as to suggest that it was sinful to procreate.(in extreme examples these prohibited marriage and promoted any other form of non fertile sex) Others that any sex that was not expected to result in conception should be abstained from.
There are some faith groups today that not only look down on or prohibit secular music but don’t even use music in their worship.
This is a complex situation and the development of a ban on music and dancing or indeed any other form of entertainment or recreation in one group may have a very different history and “reason” than that in another group.