With less efficient vehicles. If I order 10 things from Amazon its guaranteed to come in more than one box on more than one trip. If I drive to Target I can buy all of those things in one trip.
It's less efficient, but not by much. The most popular passenger vehicle that's not a truck is the toyota rav 4[1], which gets 30 mpg[2]. A ford transit connect gets 22[3]. Using those figures, an amazon van that delivers to at least 2 houses in a suburb probably spends less fuel than those two households driving directly to a store. Even if they make separate deliveries, it will probably be worth it.
The Sprinter type vans that Amazon uses in my area get closer to 18 mpg. And they have some that are just like the UPS trucks, big and boxy in Amazon blue - no doubt these are much worse.