Walmart does not suffer the cost of shoplifting. We do.
Pilfering and shoplifting is figured into the overall price structure of the goods for sale.
The higher the losses, the higher prices on everything else.
Way back in the 60s I worked at a K-Mart, then at an Abraham & Strauss store as a student nurse in NYC. Price increases have more to do with the percentage of shoplifting than with the cost of manufacturing. Not to mention that poor-selling items are often eventually priced to sell quickly to get that stock taken care of. But shoplifting is worse than most realize, especially in stores where people can walk into dressing rooms and try on items. If not monitored strictly, a person can change all underclothing and wear out a new dress or two. I have often seen old underwear in trashcans because after the person vacates the dressing room, the old clothes are left for the clerk to take out. It is costly, not to mention disgusting.
Having insurance to cover the cost of shoplifting is a small part of the picture. Depending on the amount of shoplifting, those insurance costs rise quickly, especially if high-price items are targeted. As insurance costs rise, ticket prices still have to rise along with them. There are probably some things these big box stores do not attempt to regain from insurance because of the increase costs in insurance. I recall that Walmart recently posted a very significant operating cost reversal for the past quarter. Something like 7 billion dollars. Those losses have to be made up for any business to stay in business.