Presumably this trade-in will be done by people who are thinking, "I'm not crazy about my iPad. I want to try something new." If Microsoft convinces these customers to try Surface versus something else (aka Android), it's a win.
The iPads will be resold to someone thinking, "I want to try a tablet, but I've never tried an iPad." Which is a different market segment.
Also, a $200 gift card != $200 cash. Some estimates say 20% of gift cards in the US are not redeemed. See:
http://en.wikipedia.org/wiki/Gift_card#Redemption_rate
And even for the cards that are redeemed, Microsoft is making a profit off every $ that is spent. Plus interest on any gift card balance.
It's not far-fetched to imagine Microsoft making 30%+ profit off this, while increasing the (dismal) market share of Surface devices.