SB 10.29.16

na caivaṁ vismayaḥ kāryo
 bhavatā bhagavaty aje
yogeśvareśvare kṛṣṇe
 yata etad vimucyate
Synonyms: 
na ca — nor; evam — like this; vismayaḥ — astonishment; kāryaḥ — should be had; bhavatā — by you; bhagavati — in regard to the Supreme Personality of Godhead; aje — who is unborn; yoga-īśvara — of the masters of yoga; īśvare — the ultimate master; kṛṣṇe — Lord Kṛṣṇa; yataḥ — by whom; etat — this (world); vimucyate — becomes liberated.
Translation: 
You should not be so astonished by Kṛṣṇa, the unborn master of all masters of mystic power, the Supreme Personality of Godhead. After all, it is the Lord who liberates this world.
Purport: 

Parīkṣit Mahārāja should not have been so astonished that Lord Kṛṣṇa’s so-called romantic affairs are in fact meant to liberate the entire universe. After all, that is the Lord’s purpose — to bring all conditioned souls back home, back to Godhead, for an eternal life of bliss and knowledge. The Lord’s conjugal affairs with the gopīs fit in very nicely with that program because we who are actually lusty in material consciousness can be purified and liberated by hearing of them.

In the First Canto of Śrīmad-Bhāgavatam (1.5.33), Nārada Muni states:

āmayo yaś ca bhūtānāṁ
 jāyate yena su-vrata
tad eva hy āmayaṁ dravyaṁ
 na punāti cikitsitam

“O good soul, does not a thing applied therapeutically cure a disease that was caused by that very same thing?” Thus Kṛṣṇa’s romantic affairs, being pure, spiritual activities, will cure those who hear about them of the disease of material lust.