Squirrels do indeed have a homing instinct.
It is not well understood by science, but they will often return several miles.
For example, an informal experiment was conducted at the Brooklyn Center for the Urban Environment in Prospect Park, which conducts extensive environmental education programs for school children and adults.
Some years ago, a classroom in the park’s Picnic House was invaded by squirrels that would distract the children.
So the Center trapped the squirrels alive and transported them to the Dyker Beach Golf Course near the Verrazano-Narrows Bridge, which is about seven miles away from Prospect Park 35 the crow flies.
There is no doubt that the same ones were back in three to four days.
They had somehow found their way for more than seven miles, through urban backyards and busy streets, to their preferred habitat.