Except with insurance they probably made money. The trick is for it to happen often enough that insurance gets too expensive.
Insurance will only pay out actual value (i.e. what it cost to produce those items). They’ll still miss out on all the potential profit from selling those goods.
They’ll miss it on some things for sure, but if there were sunk costs or put performing products, that money can be reinvested in better performing items. I’m sure I’m an active, perfectly running warehouse, having to replace every item just with an at cost payout would be annoying, but there’s also the possibility that the payout gets them out from under old stock they would otherwise have lost even their costs on.