Newly hatched bees come out of the hive and hover around in front of it for orientation. It’s like they are setting their gPS. Also, if bees are cooped up for a long time or something changes (like hive movement), they will also come out to orientate.