Many retails don’t buy the inventory directly, it’s still owned by the manufacturer/seller. Returns cost money in the operation but the actual product is free to them. Lots of returns end up in the trash too.
While Amazon may pay for the shipping, many low quality products are probably losing money for the seller when returned.