Most people think karma is a mystical force that punishes the bad and rewards the good. We think that there is “good karma” and “bad karma”. We say:
“What goes around, comes around.”
Then when we are seemingly “punished” for doing something that we think is good, we are confused. There is much more context that is needed to understand what karma is and how it unfolds. There also needs to be much more reflection on what is “good” or “bad” and why we think and feel that way.
Karma has no concern for “good” or “bad”. Karma is the Law of Cause and Effect. Karma is the consequence of the universe's tendency toward balance. The consequences we manifest are not necessarily punishments or rewards, and the more karma we generate and put into motion, the more difficult it is to discern what consequence is being manifested by which action because karma has a snowballing effect.
The more conscious we are, i.e. the more we are in a state of self-remembering and self-reflection, the less karma we generate. The more mechanical and reactive (egoic) we are, the more karma we generate.
So once we put the goal of self-remembering into our daily repertoire and seek the light of our Inner Being, We start to see the patterns in our life that we are unconsciously re-perpetuating, and we can get our karma under control.
The Law is not to be "good". The Law is to be in balance.