I don't know how this contradiction can be resolved
This is a major problem with religious beliefs in general: They start from abstract assumptions first, so you can fit anything into them, even if it sounds contradictory.
For example, I live in a highly religious country. When something bad happens, like someone getting sick, people flock to god, because "god is good." If the person gets cured from the disease, people will say that god is good because of that. If the person dies, people will say that god is good because the person was allowed to rest. If the person survives, but ends up crippled in some way, people will say that god is good because the person survived and because he'll reward those who suffer. And, obviously, if you raise an objection, people will say that "god operates in mysterious ways."
The problem is that people assume that god exists in the first place, that he acts in the world, and that he is "good." Since this assumption comes first, even with no solid base to back it up, everything else can be made to fit it, even if doing so requires a lot of mental gymnastics.