Why do bad things happen to good people? If God is good and loving, and all powerful, why doesn’t God put a stop to suffering?

Why do bad things happen to good people? If God is good and loving, and all powerful, why doesn’t God put a stop to suffering?
For many people, it takes the jolt of tragedy, illness, or death to create an existential crisis of faith. At such a moment, we want clarity while God wants our trust. How do we respond?