
Karma theory is quite complex and mysterious. Lord Krishna says in Bhagawad Gita that” Gahana Karmano Gati hi” . Our soul/consciousness is very ancient . Kindly note that after many cycles of birth and death , today we have reached this stage in our present birth . Basic principle of Karma theory says that , there is no mathematics works between good and bad karma.
For example , if one person has 10 units of good karma and 6 units of bad karma, then he has to face the effects of good and bad karma both. Here 10 units minus 6 units doesn’t make 4 units of good karma. He has to suffer with his/her 6 units of bad karma.
Now to understand why good/sincere person has to suffer? mainly for that , there are 2 reasons.
Reason No.1 Lets understand this with simple example. One person had very good healthy breakfast made by his affectionate mother in the morning. But immediately after that, his stomach got upset. His mother wondered how this happened ?When his mother enquired more, she came to know that his son had consumed street fast food yesterday evening, that was unhygienic. And that effect started from morning & because of that his stomach got upset.
Same way, those good people who has to suffer badly because some past life karma is now activated.
Reason No. 2 – Also another reason for this suffering , this is Kaliyuga. Means Tamas and rajas gunas around are more than Sattva Guna , so truthful person face challenges / obstacles in life because they are more Sattvik [ pious] in nature.
But one has to accept and move on in life. Such phases do come and go. One should keep doing his/her duties without losing mental balance. For that purpose yoga, meditation, Ayurveda, chanting helps to come out of that!

This is great. Keep sharing and enlightening us with such great knowledge :))