Maybe it's God's will that the devil be permitted to do his work? One of those things that can probably never be fully understood on this level. There may be a difference between what God wills and what God allows.