Very wise/sound advice.
In the UK it is a traffic offence/violation to 'quit' your vehicle whilst the engine is running, even for a couple of seconds.
The moral is.......If you leave your vehicle for ANY LENGTH OF TIME, no matter how short, you should first apply the handbrake then switch off the engine, taking your ignition keys with you.