Why do bad things happen to good people? Same reason bad things happen to bad people. Good things happen to both as well. So let's start again. Why do things happen?
There are 2 lives, the first is temporary and lasts about 75-80 years. The second lasts forever. Although I believe God cares about us in this life and protects us all to some degree, His main focus is on your next life. Wouldn't that make sense? So we experience some bad stuff in this life, who cares really, life is but a vapor here for a little while, then "poof" it vanishes. But eternity is a long damn time. I'd rather focus my thoughts on forever.
If you are a Christian things happen to bring you closer to God.
If you are a skeptic things happen to bring you to God.
It's all for you.