Venerable Ru Jun addresses this question (at the 5:18 min mark)
From the discourse, I get a few points:
Karma has to be seen from the perspective of Infinite Lives (past, present, future)
using an analogy of planting crops: you plant bittergourd, then green beans, then apples. When you plant the apple seeds, the bittergourd happens to sprout. You will not reason that you planted apple seeds and got bittergourd instead. You understand that it is because you had planted the bittergourd seeds earlier.
Besides the viewpoint of karma generated from previous lives which come to fruition in this current life, I believe that it doesn’t mean that doing good and believing in Bodhisattva will grant us immunity from illness and death, but our dharma practice of doing good and believing in Bodhisattva would instead have prepared us the right view to face this true reality of existence - as long as we are still in cyclic existence, we are not able to avoid the suffering of our body or health breaking down.