Why did the German shepherd come to the author's house?
The passage doesn't tell us directly.
He was hungry and had no place to live in.
His owner went away on weekends.
He couldn't find his way to his owner's house.