Why He allowed it to happen is a question we cannot answer (and should not try to), but we can say, on the testimony of Scripture, that God did indeed allow it or cause it to happen.
indeed must rush to say God judged it though but this could be true aswell