That's one of the reason, the other being they don't want to waste the space in warehouse holding inventories until they ship. Despite having the ability to do same day shipping, if you are not in prime they just hold your order and money for a few days then ship, and the cash flow adds up.
If they already have a full van delivering on their own, making an extra stop won't cost too much more. Holding your cash and then order from their vendor instead of keeping inventories is a good business if they can pull it off. Target on the other hand do ask if you want to save $1 and wait for the deliveries to be combined or not. I like that option better.
One thing I also heard is that the inventories you see is not the same as the inventories others see. They favors showing you items in stock nearby instead of far away only. If they are low on inventories or closing out at a great price, they show them as in stock near the warehouse and out of stock for far away customers. (I'm pretty sure they also do that to profitable customers instead of cheap stakes looking for only loss leaders).
I noted that have zero inventory was Amazon's original business model. I don't think there have been that many products that Amazon still has a vendor ship. They are probably the leading logistics company in the world - even better than UPS or FedEx.
Amazon used to not have free shipping, and lumping shipments together was the way to save on shipping. I remember getting stuff sent all the way from Kentucky. Sometimes they would still get split up because they were in different warehouses, but I still got the break on shipping. I also remember a lot of shipments from Nevada, back when Amazon was deliberately avoiding a California warehouse/retail presence in order to avoid sales tax in their biggest market. But these days it might not make that much sense for the customer if one is Prime member. Just order what you want unless it's an add-on item that even Prime members can't get free shipping unless the entire order is above a certain amount.
Sometimes I don't get their pricing. I was just looking around and a suggested item was some packages of 4-inch AmazonBasics Lightning cables. I'd prefer 6-8 inches with a short cable, but these are nice to have around especially when using with a USB power pack and as emergency spares. I could only get them in certain colors and styles, but for some reason I could get a box of 12 for $16 and $12, plus tax. It was totally weird too as I checked other colors and some sold for $150 for the same box of 12. Then I checked again after I'd picked them up and it was showing $100. I thought maybe it was a fat finger deal, but I managed to buy it without issue. They weren't even marked as any kind of special deal. That shipping was odd though. One came from some Bay Area Amazon warehouse, but the final delivery was to an Amazon Locker location where it was delivered by USPS.