I wish I knew. Traditionally karma was part and parcel of the samsaric cycle of birth, life, death, and rebirth. Virtuous living accrued spiritual merit; "good karma", leading to an auspicious rebirth. Indulgence in the three poisons; hatred, greed, and ignorance; not so much. Karma could also be cleansed by suffering in this world or the next; e.g., a perpetually angry person might be reborn in a hell realm where they awake every morning, grab their sword, and rush out to battle others like themselves; hacking each other to pieces, only to reawaken the next morning to do it all over again. Others see karma as simply cause and effect. If I lie, cheat, and steal, people do not trust me; that isolation from fully integrated community is the karmic consequences of my behavior. Mussolini ended up hanging upside down from a phone pole, but not all Mussolini's do...or perhaps they do in ways I don't realize. How to reconcile that, I don't know. The best I can do is suggest that if you believe in rebirth, practice the Noble Eightfold Path, as it accrues spiritual merit leading to an auspicious rebirth. If you don't believe in rebirth, then I would suggest that you practice the Noble Eightfold Path, as it demonstrably leads to an amelioration of suffering in this life. Do not consider the faults of others Or what they have or haven’t done. Consider rather What you yourself have or haven’t done. Dhammapada 50
The universal experience that good does not necessarily result in good consequences and vice versa, alongside the need for ethical regulation of the society has been a problem in personal and social considerations forever. Probably one of the few fundamental reasons humanity needs religion this much. Ethics are needed for a society to function, but for the ethics to function ideals have to be universalised and absolutised, even if that is not the objective reality of perceivable existence. To breach the gap between such an idealised ethical system and the perceived realities we need to introduce an x factor into the equation and most religions (at least pacified ones after antiquity ) do that. The particular metaphysical solution might vary, the two most popular being some sort of permanent afterlife to suffer consequences or a circular rebirth under the influence of karmic consequence. The principle of simplification (the principle in math and science that the model tends to be better when it has the least possible number of unknown variables if the result is equally good), or Occam’s razor in philosophy, alongside the fact that only the need for a solution of that dissonance through religion is universal, but not the specific solution itself (the same goes for religion in general) tends towards the probability that there is no consequence, and that the idea of transferring observed causal physical relations to unobservable metaphysical consequence of ethical decisions in religions relying on the karmic solution is just religious wishful thinking. Either way it is ultimately a matter of faith, not of facts (falsifiable and testable claims), so whatever helps your mind to deal with it is as good as any other belief.
I think I am trying to pick holes in things, through a little frustration. It probably, ultimately does not help much. Wasted time and mental energy.