Because their inventory isn't real time and isn't 100% accurate. They may have had one in stock last week, but it was shoplifted on Sunday and they have no idea it left the store. Or they had one when you were looking, but the one they had was in someone's physical cart and not on the shelf and that customer checked out fifteen minutes later - with the last whatever you were looking for.
So pick up in the store was available, because its something
WalMart stocks in your store, but they ask you to wait to confirm that it actually is in stock before going to the store to pick it up.