Why do bad things happen to good people? Why do parents lose their only child, who collapses and dies after football practice, in his teens? Why does a good person suffer a fatal wound in a random shooting? Why is a good person suddenly unable to care for her/his family due to another person's greed and fraud (think Ponzi scheme)?
Short answer: We're finite, fearful, foolish, flawed...and sometimes stupid and/or sinful.
Our bodies can only tolerate a certain amount of injury or illness before they succumb to these. Our bad choices or foolish fears have consequences for ourselves and, sometimes, others. We are vulnerable - before birth, during birth, after birth.
None of this reflects on God, or God's design of human beings. We're finite because we're creatures - God alone is uncreated, and God alone is without those limitations I listed, which are found to some extent in every person. In fact, when the Bible calls God's design of all creatures (including us) as "good, very good," I believe it's because that design includes human reason. Remember what I wrote about reason? It includes "intellective discourse" - i.e., book knowledge - but also emotions, intuition, wisdom, insight. That gift of reason is what helps us make wiser decisions and life choices, but we have to use it. Fear, grief, or other passions can (and often do) cause us to do things without using that gift, or at least without using it well. Sinfulness - our own, or that of others - bypasses reason.
All of that, and more, is on us. Not on God.
Okay, that's not very comforting. I don't believe there is any "happy" reason why a child of 7 is left with his mother dead and his father in jail for murdering her and 7 others. God hates suffering and pain - the Holy One created us to be good, faithful, fruitful; "I have said these things to you so that my joy may be in you, and your joy may be complete." (Jn: 15:11) "Ask and you will receive,so that your joy may be complete." (Jn 16:24b) So says the One who turned a water jar "full to overflowing" into wine - no stinting on the goodness given! God walks with us in our pain and fear, suffers with us. But the Holy One doesn't cause the pain/hardship/ suffering. These stem from our design, a design we misuse or abuse at times, as finite, flawed and sinful creatures. God neither bypasses that design, nor coerces behavior that would abate the suffering - for that would negate the great gift we have to choose - sin or goodness, God or self, and leave us nothing but puppets moving as God the Holy pulls our strings.
Bad things happen to good people. Most of the time, at least, what goes around comes around - the person who caused your hardship and pain will suffer too, the good you've been and done will be the source of your healing or help.