The law of karma is meant to help us evolve to a diviner state. It is neither a punitive judge with a small mind who has created this law nor a Company executive who plays the game of carrots and sticks. It is a deep and profound Wisdom that has built the worlds and one has to identify with it to understand the forces that work in creation. But we often tend to humanize the Divine way of working believing it to work in our little human way.
To take a small example, if karma and its machinery with exact reward and punishment is all the truth of things then God would be a mechanical arbiter of Justice or a just and accurate accountant with no heart of Mercy and no Grace that can redeem us. He would not be the All-Compassion and Love that spiritual experience and even the experiences of life constantly reveal to us. It is a different matter that who would feel inclined to pursue a god who is just like or perhaps worse than a human being. Even an evolved humanity forgives and shows compassion. A God who is busy keeping the account of our deeds done in Ignorance which in turn is itself a process of God in His becoming is hardly fair and just even. Even a human judge takes into account and differentiates between a deed done in ignorance and another done deliberately and with malicious intent. Clearly the intent and state of consciousness, the motives hidden to outer eye are far more important that the act itself. The consequences too are primarily inner, the soul blinded by the coats of falsehood and sanctioning the inferior movements of nature goes through an obligatory inner purification or else suffers being cut off from the Light and Delight that are its native right and natural to it.
So too there is a difference between a ‘good’ deed done for name and fame or else a heavenly reward or out of greed and fear has little value and brings no great upliftment or any sublime joy. That is what ‘honest’ people often lament about, that though were honest they met with outer hardships and failure and defeat. Honesty done to get these things is hardly of any value. It helps only if it is done for the joy of it, because it is the right thing to do, because one believes in equitable sharing of wealth etc. The result is a growth of consciousness when done with the right attitude while, on the other hand, a veiling of the true inner Self, a cutting off from the Universal Self when done with a selfish attitude.
Karma is essentially about learning and growth that the soul in Ignorance must go through as its primary schooling. But the soul is never alone. There is the Grace and the Grace can completely override and even annul karma and change the inner and outer consequences if there is the call for Its intervention. This has been the experience of all who have walked the spiritual Path leaning upon the Divine for help and support.