“If God is real then why does he allow bad things to happen to good people?”
He gave us free will, and that’s why our rights are God given, not by some bureaucrat. Humans are inherently flawed, because we were given the option of choosing from the begin between what is easy and what is right.
Jesus knew he would be betrayed, and yet he didn’t intervene in that choice.