Wonder why it is a No with cars & lorries then? (The refuelling station would not care if it was stolen whilst unattended - not their problem)
This is nothing to do with a risk of fire, instead it is all about reducing the chance of the car running away (a manual car cannot be securely parked with the engine on, and even an auto can have the transmission selector bumped out of Park by a passenger) and getting people to be fully attentive to their actions - risks which are managed differently in the railway environment where procedures don't need to be quite so amateur-proof.
The same applies to the refuelling station rule about not using your mobile phone. There has never been even a single pump fire caused by a mobile phone, not even when
Mythbusters went out of their way to stack everything in favour of trying to create one. The problem with mobile phones is nothing to do with fire and everything to do with a text or voice conversation on a phone being a bigger impairment to awareness and attention than being plastered over the legal alcohol limit for driving.
So long as the car is securely parked, no naked flames are present near the car's refuelling port and it's not an enclosed garage, it is completely safe to refuel a roadworthy petrol or diesel car (not sure about LPG fuel systems) with the engine running. Yes, there is a
tiny chance of a static discharge starting a pump fire (so tiny it is deemed acceptable for ordinary amateurs like you and me to refuel our own cars and for others to drive in/out of the station at the same time as other people are filling up) but this is completely independent of any risks associated with running engines.
For the rare case of a flat battery, it's safer to refuel with the engine running (wheels chocked if it's a manual) than to switch the engine off for refuelling and then start it using jumper leads from another car's battery.
In terms of locomotives, it is safe not only to refuel without shutting down but even to do it on the move. A number of freight operators in Australia run trains through the most remote areas (including a straight section just 12 kilometres shorter than London-Penzance) with a couple of tanks on a wagon to top up the locomotives at the front as they go along. This allows the operators to efficiently work around the awkward combination of the world's most remote lines being restricted by axle loads of the early 20th century. See the first part of this video for an example...
[youtube]5qaNJEkXl9E[/youtube]