It makes sense for Amazon. If they gave away the items that didn’t sell, very soon they would have no customers. Amazon is in the business of selling goods, not storing goods.
They could donate them out of market.
I grew up in Long Beach, Cal right after WWII. My parents told stories (don’t know if they were true or not) of seeing barges full of boxed jeeps and trucks being loaded on barges to be dumped at sea. Even in the 60s there were rumors floating about of warehouses being discovered full of surplus military equipment. No new cars had been produced during the war years so the waste of perfectly-fine new vehicles seemed terrible. But if the government had sold them, how would Ford, GM, Chrysler, Packard, etc. get back into the car business?
What it tells me is they are knowingly over-ordering to get massive volume discounts so they can undercut other retailers on sales prices.
It stinks of monopoly activity, but is likely in a gray area of legal vs illegal.