Whereas Amazon has a huge warehouse / fulfillment footprint, Home Depot uses stores + a few (2?) online-specific fulfilment warehouses.
The benefit of that system has been really efficient storage costs. The limitation has been multi-item (especially rarer) pulling from multiple stores (because each only has a few pieces).
At a high level, Home Depot's logistics goal is zero warehoused inventory. Either something is (a) on a ship, (b) in transit to a store, or (c) in a store.
Home Depot has been around since 1978.
Retooling a brick and mortar logistics system into a flow-through, multi-channel one isn't simple, cheap, or easy. But they've been working on it since ~2010(?).
Suffice to say... looking at retail is like looking at the tip of an iceberg. Most of the company (the logistics), you never see.