It's true that they could sell a car for below "invoice" which would technically be a loss on that individual sale. But there are various incentives and other factors to be considered which, at the bottom line, will result in overall profit. Depending on how various costs are allocated, the loss becomes a profit.