It's important to know what your options are if your passport is stolen when you're overseas. Often if it is stolen, your wallet and money will be taken at the same time and that's a scary feeling.
I had mine stolen a year ago when I was traveling in Europe and it was terrifying. I managed to get back to my hotel and get online to put a hold on my credit cards, but I quickly realized that even if the thief hadn't managed to get much money off of me, by taking all my identification, he was leaving me with very few options.
I was fortunate that there was an embassy nearby and they were able to help me and the hostel I was staying at was very kind as well. There isn't an embassy for every country in every city though, obviously and you might have all the money in the world in your bank account but without ID or credit cards you won't be able to access it.
So, always have a backup plan for losing your passport, or better yet, always keep your passport and your wallet in separate places whenever you can.
I've got into the habit of double checking that I've got everything every few minutes now when I'm traveling which can be annoying, but at least it keeps me safe.