This question already has an answer here:
Trying to remember the title of a short story about a robot who survives several generations of a family, and at one point stows away on a spaceship. It was an older story — I want to say pre-1970 — part of an anthology. There was some reason why he stowed away. Maybe he was trying to get home? His longevity figured into the plot somehow. He might have been facing obsolescence.