I know there is costs, but if they filling that gap, thats a ton of bloat, bear in mind those costs are spread across many many products, the staff e.g. wouldnt be employed just to sell this one product, and likewise warehouse space isnt just for this product so those are costs are split across all sorts of products, manufacturers also have staffing costs including sick pay, warehouse costs, transport costs, of course also electric, and so forth.
Wouldnt surprise me if its a combination of bloat and fancy accounting. Its easy to not take care of bloat when you sell an essential product as can just bump up the price to compensate. You also forgot to mention the fraud at self checkouts and slackness when dealing with shoplifters, retailers just dont seem efficient at all. Its all recoverable via bumping prices.