Srimad Bhagvata Mahapurana: Book 10: Chapter 33: Verses 27-37
The king submitted : It was in fact for establishing Dharma (righteousness) on a sound footing as well as for the suppression of that which is other than Dharma (viz., Adharma or unrighteousness) that Lord Sri Krsna, (the Ruler of the universe) descended (in the world of matter) along with His part manifestation (Balarama). How (then) did He, the Promulgator, Institutor and Conservator of ethical standards, commit a transgression in the shape of embracing others' wives, 0 holy one ? With what intention indeed did that Lord of the Yadus, who had all His desires fulfilled, perpetrate a repelling act ? (Pray,) resolve this doubt of ours, O sage of sacred vows ! Sri Suka replied : Violation of Dharma (the principles of righteousness) and overboldness (too) is (occasionally) witnessed on the part of the mighty. It does not (however) bring (any) sin on those possessed of exceptional glory as in the case of fire, that consumes everything (including even impure substances such as filth and corpses). He (however) who is not (so) powerful (and is bound by his Karma) should never deliberately attempt this even mentally; for he who does so through folly (recognizing himself as powerful) will (surely) meet his ruin even as anyone other than Rudra would if he were to swallow the poison churned out of the ocean. A precept (alone) of the mighty (those possessed of wisdom, dispassion and so on) is authoritative (and therefore worth following, if uttered in right earnest and not as a test of our wisdom). Their conduct (however) is worth imitating on certain occasions only. (Therefore,) an intelligent man should follow only such conduct as is consistent with their own precept.