That was very nice of you to help the dog. Many people just wouldn't bother.
There were two dogs running loose in my neighborhood once and only one had a tag on the collar. I went to the address on the tag, but no one was home. So I put both dogs in the fence and made sure they had water.
A couple weeks later I found out that only the dog with the tag belonged to them. Can't imagine what those people thought when they came home and found two dogs in their fence.