People buy the code, and activate it instantly. This means they have got it, and there is no risk of the other party using it. Then, with iTunes you transfer the credit to people's accounts when they buy, so it makes easy profit (if you can find buyers)