We all have to agree that Karma is within the Maya. Its applicable to those who are bound by maya.
Bhagavad Gita Chapter 3, Verse 17: One who remains ecstatic within the
self; self illuminated and fully satisfied within the self only;
activities do not exist for him.
Bhagavad Gita Chapter 3, Verse 18: In this world for him no purpose is
gained by discharge of actions neither is any sin incurred by
non-discharge of actions and among all living beings never needs to
depend upon anyone.
If this is the case with Yogis and Rushis we can understand about the yogishwara Krishna and Rushiraj Rama.
I would like to mention Sri Ramakrishna Paramahamsa's quote here:
"The snake itself is not affected by the poison in its fangs; but when
it bites, the poison kills the creature bitten. Likewise Maya is in
the Lord but does not affect Him, while the same Maya deludes the
Then why the Lord (You may call him/her/it Siva, Vishnu, Devi) involves all his activities?
First of all the activities of jeevas are called Karma, but the Lords activities are called Leela. We cant call our activities as leeva, as we don't have control over them.
Why does he perform leela then? Lets refer Bhagavad Geetha once again.
Chapter 3, Verse 21: Whichever and however a great personality conducts
himself common men do also; whatever he accepts as authority that and
that alone certainly all the world will follow.
Chapter 3, Verse 22: O Arjuna, in the three worlds, the heavenly worlds
and the material worlds there is no prescribed duty for me, neither
anything to be obtained or unobtained; yet still I am engaged in
Chapter 3, Verse 23: O Arjuna if ever I would not engage in prescribed
activities certainly all men would follow My path in all respects.
Chapter 3, Verse 24: If I cease to perform prescribed actions the
inhabitants of all the worlds would be put into ruin and I would be
the cause of unvirtuous population and would destroy all these living
Chapter 3, Verse 25: O Arjuna, just as the ignorant act attached to
activities; even so the wise being unattached should act desiring to
benefit the welfare of the world.
Even though they are out of Karma and Maya they need some kind of reasons to come to earth and perform certain things and fulfill certain wishes.
If you read carefully all the avatara's actions will justify above references by Lord Krishna.
Regarding referring Telugu movies, I really like them but they are not 100% authentic according to shastras/Puranas, You can understand this looking at movies where Ravana and Dhuryodhana are in the main roles. To make the these characters heroic they have degraded the counterparts.
In fact the pride of Telugu people NTR is famous for acting not only in positive characters of Puranas but in negative roles like Ravana, Dhuryodhana, Karna etc.