If we look at a spring swarm, these bees leave the parent hive and fly a certain distance before they settle and build a new hive. This is seasonal migration, with bees seeking new territory to work in.
Bees go away by absconding if conditions are not favorable. They will also stop flying when it gets very cold and under such conditions, they appear to have gone away. They are in fact just overwintering and will reappear in spring.