
Noticed how sheep seem to just wander about, straying on to the roads in the Yorkshire Dales? That many areas of the Dales don't have fences but the sheep don't run away? How does anyone know to whom they belong? The sheep may look like they're wandering at will but they have an ancient homing device built-in.
When lambs go on to the moors or fells they learn their “heft” or “heaf”. The mothers go back to “their” area and their lambs start to develop the same attachment to a particular place, becoming "hefted".
Even when a farm is sold, the sheep may remain on that farm, with the instinct for a heft being passed down through generations of sheep.
I think some people feel the same about their own patch of land or home?!