But Wal Mart's shipping can be much cheaper due to their predetermined, set routes. A truck is going to that store every night regardless of what is on it. They often offer free shipping to the store because the marginal cost to them for putting one more box on a truck is negligible.
Unless you've arranged to live within walking distance to a Walmart, you've got to get there one way or another; by buying gas and driving, or by taking the bus subsidized by the local municipality.
Seems to me like UPS (or whoever delivers for Amazon) also has predetermined set routes. Also, just because marginal cost is zero doesn't mean cost to shipping customer is zero.