The same goes for Costco and Sam's club gasoline. They take a loss selling gasoline but make it up on in-store sales.It is true that some products are made for a specific reseller. Computers are the classic example. Warshing machines.
And there are loss leaders. Costco loses money on the $5 chickens and possibly on the tires.
But the major oil companies are not gonna switch over and make a sprecial brew for Wally World. That would likely incur a larger cost than just making the same stuff. WW gets a volume price based on their huge sales.