Amazon delivers very little of their own product. UPS and FedEx deliver for them, and those businesses are built entirely on economies of scale.
I agree with your point about medical costs, but there's no doubt that hospitals in rural areas wouldn't offer specialized treatments and procedures because they don't have the volume of business they would need to justify the cost of building the facilities and buying the equipment.
Service businesses locate as close as possible to their customers (and employees) so that's the advantage of locating in a city rather than the exburbs despite the much high location costs. Not everyone in the city needs a triple bypass so in that case locating within reasonable reach of a national airport might be better. In fact, it would be cheaper for the taxpayers to have most uninsured patients report to the Southwest Airlines check-in desk to be treated in their home countries rather than treating them in the big city.