Walmart has a mechanism for legit sale of items to those who plan to resell it at retail.
It's called Sam's Club. A retailer files certain forms (exactly which ones I don't recall) and is added to a database of authorized tax-exempt resellers. It can now go to Sam's and buy stuff without paying sales tax, because it agrees to collect that tax from its own customers when the items are resold.
Of course, ammo flippers are not doing this. If retailers are buying up Walmart ammo and reselling it from their shelves, the state (assuming it's a state that has a sales tax) is getting paid twice.