Fuel injected cars' fuel pumps tend to be able to provide way more volume than the injectors need, so some of it is bypassed and returns to the tank. This also filters the fuel more often and to cool things. Trying to get all of the air out of the lines can be problematic, and injectors are also lubricated by the fuel as well as being cooled. Running out of fuel is not a great idea on many of them, and the car will shut off before the tank is actually 'dry'. Then, because the tank is so small, if the car is not level when it is filled, any small angle can potentially prevent you from filling it. Some older diesels can't be restarted if you run out of fuel without a manual priming, but most more modern ones can.
2011 535i x-drive GT, 2014 i3 BEV