The only time I saw this was when one of my hives replaced their queen. The old queen left the hive and a mini swarm followed her. After about 20 minutes most of the bees returned back to the hive. She stayed on the branch for a few days with a handful of loyal bees. When she finally died I assume the rest of the bees returned to the original hive.