In the material world, pleasure is ultimately manifested in the sex attraction between man and woman. The man lives simply to be attracted by women, and the woman lives simply to be attracted by men. That is the basic principle of material life. As soon as these attractions are combined, people become more and more implicated in material existence. In order to show them special favor, Krsna exhibited this rasa-lila dance. It is just to captivate the conditioned soul. Since they are very much attracted by sex, they can enjoy the same life with Krsna and thus become liberated from the material condition.
In the Second Canto of Srimad-Bhagavatam, Maharaja Pariksit also explains that the pastimes and activities of Lord Krsna are medicine for the conditioned souls. If they simply hear about Krsna, they become relieved of the material disease. They are addicted to material enjoyment and are accustomed to reading sex literature, but by hearing these transcendental pastimes of Krsna with the gopis, they will be relieved of material contamination.
From Krsna Book 33: Description of the Rasa Dance