When a servant does good, the enabling help and favor come from Allah. When a servant disobeys, the gift of choice is used contrary to His command.
Allah’s will encompasses the occurrence of both kinds of acts, but His approval concerns obedience, not sin.
Justice relates to accountability, while favor brings guidance, protection, and other blessings.