They're competitors, and presumably are selling the item at different prices.
If Amazon is cheaper, HD would have to give you the item for less than they normally sell it. If Amazon is more expensive, why not buy the thing directly from HD, you're going there to pick it up anyway.
If something is on Amazon, why can't I pick up from Home Deport and have them ship inventory to Home Depot to replace the thing I just picked up...