I thought of this:
God wants to see who's good and bad before he lets them in his heaven.
I don't really believe in God, but it seems like this is something anyone would do. It's kind of like not letting someone in your house because you don't trust them.