Canada does the same. I was in the UK on a work visa when my passport got stolen. I went to the Canadian embassy and they were able to provide me with an emergency travel document to get home. Luckily my dad was able to pay for a plane ticket home but they offered to front me the money if I had no other options. They also gave me money for food and public transit until I could fly home and the amount was added to the total cost of getting a new passport back home.