Call me cynical, but supermarkets would not be offering delivery services if they made a loss on them. In normal times the service is heavily promoted by Tesco and Sainsburys, with money-off vouchers (up to £12 off a £60 shop) sent out after most shops for use on the next one, so yes, it’s a brilliant deal for the customer, but it’s obviously for the providers’ benefit too. They’re not charities.
The big companies may well have to spend up to £7 preparing each delivery. But the costs of maintaining in store services - checkouts, changing rooms, toilets, car parks, security, display, cleaning, etc - will be higher. As more automation takes over, as at the big Ocado depots, where the orders are prepared by robots, the costs of delivery will decrease. There’s also, if course, the fact that customers can easily be swayed into buying more if they’re not having to lug it home, and can see all the “offers” without moving from their chairs!