Can any organization world over function in absence of bookkeeping? Karma acts as accountant general of cosmic system, keeping record of every single action indulged by human beings, whether physical or in thoughts. As per doctrine of Bhava karma in Jainism every single thought positive or negative precipitates into an act of karma.
For life to evolve in cosmic system, for human beings to evolve the inherent function of karma is necessitated. It is only through inscrutable laws of karma soul atman moves from one manifestation to another, body after body. In absence of karma evolution was just not possible.
In layman terms karma means as we sow so shall we reap nothing less or more! As our indulgence accordingly precipitate the result.
After the death of human body, the new body manifested by soul atman is based on residual balance of karma at the time of death. It is the child that chooses ones parents. Based on residual balance of karma at the time of death one is born in the house of a laborer and the other as prince.
The one taking birth in the house of a King had more positive residual balance of karma in balance. Not necessarily one born in the house of a King is more virtuous than one born in the house of a laborer. In the journey of life the position many reverse. The prince may get killed in a battle and the laborers son by quirk of fate become the new king.
What lies in store behind, we never know. One can never manipulate workings of karma. The most human beings can do is indulge in good karma, positive karma most of time to improve our present and also future.
Spiritually the closing balance of present life becomes opening balance for next manifestation. Human beings who believed in doctrine of karma were a satisfied lot. We just cannot question law of karma, it is beyond human purview!