Walmart doesn't sell 'seconds' as you might normally consider. They do often receive inferior quality merchandise from their suppliers, often under the same SKU. This is how they compete on price. It's like the mattress business, at scale.
When it comes to some products, especially the more expensive ones like televisions, certain retailers will get custom SKUs. The products will have a feature added or removed or be in a slightly different color.
The idea is to short circuit the price match guarantees that they heavily promote.
If the SKU is the same, wouldn't this open everyone up to the problem in which a buyer buys one item from the expensive retailer (better product) and one from the cheap retailer (inferior product), then returns the inferior product to the more expensive retailer (keeping the better product at the cheaper price)?
This can and does happen. Though, for most items, the net gain you'll realize probably isn't worth the effort.
Consider this from Walmart [1]. Mobile 1 5W-30. Something I buy frequently, but not from walmart. Walmart's site doesn't list a SKU, but you can see the UPC code from one of the pictures.
Same exact SKU as Advance Auto [2]. The problem? I know for absolute fact that the containers that hold the oil look totally different (and Walmart's online photo does not reflect reality). I don't buy motor oil from Walmart because this is the crap they pull. And it's not like this just recently happened or the manufacturer recently switched. I've compared the containers across years and several states now.
Maybe the packaging is just different but it really is the same oil on the inside. I don't trust Walmart enough to find out.