Mackie seems to be rejecting the libertarian conception of freedom. You could have done otherwise. It doesn't matter that you couldn't have done otherwise. In lectures on both Pike and Leibniz, compatibilism came up as a way to reconcile divine omniscience with human free will. People can be free, even if God made them so that they always do the right thing.
People can do evil.
Even if compatibilists accept that the world is better with free will, they reject that evil is required in this better world. See Plantinga's response to Mackie in Curley's intro notes 8. Give up God's omnipotence or omnibenevolence. This sounds like Mackie is assuming the libertarian conception. Mackie suggests that divine foreknowledge is inconsistent with free human will.