It would work like this: I buy an apple product from amazon. Bring it back to apple who can resell it and they give me credit for which I use to supplement buying another apple product from the Apple Store. Plenty of people get gifts without receipts and return them to stores that sell those products for credit even though they have no idea if the gift came from that store.
I'm afraid you've made a glaring omission.
If this happened Apple would end up selling a product at cost with Amazon earning the profit.
Illustrative (and simplified) example: Amazon sells iPhone to you for $500. They bought it for $400. They make $100 profit.
You "return" the item to Apple. They credit you $500.
Apple sells this iPhone to someone else for $500.
Apple profit zero; Amazon profit $100. It simply doesn't work... Apple has the sale; Amazon has the profit.
Indeed then every Apple reseller could just buy at trade prices (i.e. $400 in this example) and just "return" them to Apple. Waaheyyy free money! No.
And this is before we even consider real-world factors such as that Apple will not resell a returned item. For all they know you could've re-cellophaned it and it just has a brick inside. All Apple returns become refurbs.
The shocking thing is that so many people think OP's idea
is actually how it works. That crazy guy who smashed up that Apple Store in France did exactly the same thing - he wanted a refund for an iPhone he didnt buy from there. Madness.
Oh and the loads of people doing it thing... that's fraud.