"What you reap is what you sow."
Generally every human birth is based upon the rule of Karma. If you do good you will have good and if you do bad then you will have bad things happening in your life. Like Jaise Like "Jaise Karni Waisi BharniBharni".
The Lifelife story of Lord RamRama and Devi Sita is quite painful. What are the reasons they had to face these many problems in life.?
I don't think it has anything to do with karma cozbecause Lord Vishnu is not going to do any sinful act.