All this is true for many other products, specifically cars. Ford makes the Bronco Sport anyway, and they make money on it.
I get it, Apple has much better margins than Ford. And maybe a iPhone 18 Mini would reduce total margin for them. But if they move a couple of million units, it absolutely would make money.