Former Associate here. Some insight into the absolute cluster-beep- that is Walmart Inventory Management.
Inventory in Wal Mart stores is primarily governed by a computer tucked away deep inside the cash office somewhere. It relies on tracking how much of an item is shipped in VS how much is SCANNED out at the point of sale. There is a given level of stock for each item in the store that is to be maintained and replenishments are ordered by the computer when the amount of stock scanned out reaches a certain threshhold relative to the stock received. This is all set remotely by the home office in Bentonville, too, store maganement has little if any control over inventory.
SCANNED out. That's key. Items can leave the store one of two ways and NOT be scanned out. One is obvious: Shoplifting. Probably not a frequent problem with motor oil, but hey, people will steal daggum near anything these days you never know. The other, and more likely, scenario relavent to this forum: Improper claims procedure.
Every item damaged in a walmart has to be 'claimed out' by an Associate to update the system appropriately. If this is not done correctly, it has the same effect as if someone just simply shoplifts that item. The store's inventory management system shows, say, 12 pieces came in, 10 pieces scanned out, assumes there are still 2 pieces on the shelf, and since motor oil isn't exactly a high turnover product it does not re-order.
It is, in theory, possible to override this. Department managers on their 'tel-xon' are able to scan a shelf tag(You look at the price tag close enough you'll see a barcode for that item on it; this is what they're scanning) and can override it. THIS SELDOM WORKS! The inventory management system is notoriously bad about overriding the overrides. I worked over on the grocery side as an overnight stocker and then 2nd shift meat department stocker, so I sometimes got given permission to do this on problematic items, which....let's just say it can take MONTHS for an override to actually result in product showing up.
Now, when you order a product on the website and select ship-to-store, you sidestep EVERY BIT OF THAT. Your online order is checking against WAREHOUSE stock, which is a hell of a lot more reliably tracked, and completely ignores local store stock. A truck(or two, three, whatever, depending on order volume) is dispatched from the nearest warehouse in the evening containing such orders. That truck is scanned in, unloaded, and voila: Your ordered item is there the next day.