Bees sting people if they feel that there is a threat to their hive or colony, according to the U.S. Department of Agriculture. Bees that are not around their hive also sting people if they are agitated or swatted.
Once a bee stings, the hive is alerted to imminent danger by the scent of the venom if the hive is nearby, states Anna Christiansen of PBS Newshour. Although most types of bees are considered harmless, the worker bees must protect the colony because they are the only ones that can sting. A worker bee begins to produce venom by the time she is two weeks old, according to the U.S. Department of Agriculture.