When few blind persons came across an elephant, the one holding the tail said elephant was like a big brush. The one holding the leg said elephant was like a big column and so on. None could get the whole scenario. The same happens with ignorant people world over.
Karma is not punishment as deduced by many. Agreed, law of karma says as we sow so shall we reap nothing less or more. As our indulgence, accordingly the results! It is our indulgence that is at fault, never the doctrine of karma. If we indulged in good karma, the results would always be good.
For people indulging in good karma if they suddenly get punished, everything resulted from negative karma indulged by us in past. As per doctrine of karma and ordained by God the fruits of karma can fructify immediately, after a few days, months, years or even after many lifetimes. Whenever we suffered in life we tend to blame God Almighty for karma indulged by us.
To live life meaningfully, understanding doctrine of karma in entirety is an absolute must. This became possible when we indulged in spirituality detailed in Bhagavad Gita. Unless we believed in Hinduism and its doctrines, we could never understand law of karma in totality.
I again repeat karma is not a punishment. We simply reaped fruits of karma indulged by us in past.
As ordained by God every single negative indulgence in present or past never goes unnoticed. One shall always pay for negative karma indulged by us in present or past. If we do not desire suffering at any stage of life then our indulgence in good karma, positive karma at every stage of life is an absolute must.
Still owing to law of evolution we are bound to suffer sometimes at all stages of life. This is how life evolved in cosmic system.