Pooka, I'll bet UPS has a contract with Amazon that gives them a discounted shipping rate in exchange for taking full responsibility for problems. When UPS pitches their service to a potential customer, they talk up their abilities, one being getting the package into the right hands, guaranteed. Of course if they can't find the right hands, it goes back to Amazon. That's bad for Amazon because much of what they sell in drop shipped from the supplier, and Amazon never sees it at all. Anything returned is a headache and billing problem that costs money to address. It's cheaper for Amazon to replace some orders than have to address returns and they'd still have to pay UPS for the attempt.
You can bet, if Amazon wasn't saving on the bottom line, their agreement with UPS wouldn't be in effect long. Amazon does have a great deal of clout with shippers. They're an 800 lb Gorilla.