Because if they didn't do that, anti-theft would be just a useful excuse to further rob the consumer of agency.
They do give out such a code, right? I'm just assuming here, but since they paint themselves as such champions of ecology [1], they must. Because if they didn't, that would make them hypocrites, and liars, in claiming there is no way to deter theft without taking rights from the consumer. And we know Apple is honest and on the consumer's side, so that can't be it.