"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 Karni Waisi Bharni.
The Life story of Lord Ram 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 coz Lord Vishnu is not going to do any sinful act.