The doctrine of karma forms integral part of Hinduism and also Jainism. As per Hinduism scriptures life in cosmic system cannot move further in absence of laws of karma. It is karma that facilitates evolution of life in cosmic system. In absence of karma evolution was just not possible.
For life to evolve, the inherent inbuilt property of karma is necessitated. Why so?
As detailed in Hinduism scriptures like Bhagavad Gita and Upanishads (independent spiritual treatises) all living forms including human beings primarily are spirit, soul atman manifesting a body. After death of present body the released spirit manifests a new body immediately.
This cycle of life goes on and on until it reaches last leg of cosmic life, 8.4 millionth manifestation. The travel of this spirit from one body to another is governed by inscrutable laws of karma. Whatever the residual balance of karma at the time of death, accordingly the manifestation of new body! It is the child that chooses its parents and not vice versa.
Ever since souls atmans, the spirit started its cosmic sojourn they got mired in impurities. To cleanse self of dross impurities within these souls atmans manifest a chain of bodies one after another. The physical manifest body indulges in karma to evolve from within.
Even if a person is sitting idle doing nothing, karma is doing its work. Every single thought precipitates into an act of karma. As our karma, accordingly the manifestation! At no stage of life God is responsible for our karma. Why blame God for karma indulged by us in present or past.
Human beings who blamed God for their sufferings were mistaken. Sufferings were part of cosmic design. For human beings to evolve, for life to evolve both sufferings and happiness were part of life, a process of karma.