Just a light puff of smoke or three through the opening in the inner cover helps calm the bees and keep them in the hive. There are two main ideas about how and why smoke works to keep the colony calm during an inspection. First is that bees communicate through scent-the queen emits pheromones that unite the colony, the workers judge the health of each other and the hive by smell, and they alert each other to danger via scent. A few puffs of smoke can help mask any alarm signal the workers may be sending, helping keep the rest of the bees relaxed.
The other idea is that the smell of smoke triggers an instinctual evacuation process for the bees-but before the fire gets to the hive, they want to load up on all the honey and nectar they can. Many of the bees will head into the hive, gorging on honey, and stay there in a blissful state of satiation while we inspect the hive. A false alarm that pays dividends.