suggests that
forbidden or morally questionable pleasures may seem especially attractive; historically the saying also contrasts the appeal of secular music with religious music.
For example, one does something unworthy or lawless just for the pleasure of it. This is a situation where “The devil has the best tunes” applies.