This reminds me of the first time I hiked the Highline. A wonderful dog fell in behind us about the second day out, somewhere around Ellison Creek and followed us to Pine, a couple more days. We finally connected with the owner, who said she (the dog) had done that before, often with the race. The dog knew the route, when some of us got off track heading up the rim she sat down on the trail and waited for them to come back.
The bear went over the mountain to see what he could see.