When I was a kid my Mom made me get rid of my cat. She gave it to a friend 13 miles away. 3 days later he was on my apartment doorstep. I was able to keep him after that.
My wife and I built our home out in a rural area. In the fall of the first year we were there it started to rain and sleet. Glad to be indoors, we heard a barking coming from outside. There was a stray dog without a collar barking at our house while standing in the rain.
I opened the garage door and let the poor dog take shelter. He approached, did not bark but wasn't overly friendly either (no tail wags, kept his mouth closed, and his eyes were wide). I got a fresh towel and dried him off but his fur was very thick and matted, so much so that I don't think he felt much of the rain on him. He did not have a collar, did not particularly seem to enjoy the drying, and didn't seem too fond of petting. I got the distinct feeling that this dog was on a mission, just a dude who needed some shelter until the storm passed. Not having any dogfood, we gave him a slice of pepperoni pizza to eat and let him stay in the garage until the morning. The next day, as soon as we opened the garage he strolled out and continued on his way...wherever that took him.
There are so many stories about Dogs finding their way back to their owner. I'm wondering what unknown sense they have that we are not aware of.
So, really Joe Dirt was a modern day retelling of the story of Bobbie the Wander Dog.