It turns out that the fuel sensor was faulty. Which is why the tank ran empty.
Apparently there are two sensors, one in the tank and somewhere else, he couldn't explain to me where the other one was. Car won't be ready until next Monday. No loan car at such short notice.
This is our 7th new car purchase and first BMW. The first time any of our new cars had to be towed.
(Note: my wife's Golf had to be towed once, but that was because she filled it up with petrol instead of diesel
)