Honeybees die when they sting. In fact, honeybees are the only type of bee that dies when it stings, and only one type of honeybee even stings — the worker bees, which are all female. The worker bees sting, not to defend themselves, rather, they do it to defend the hive. When the bee stings, it also releases venom, the scent of which serves as a signal to the hive that there is a threat.
The most common and visible type of honeybees are the workers. Each hive has tens of thousands of worker bees, followed by several hundred drones (all male) that attend the hive’s single queen. The purpose of the workers is to go out and collect pollen for the hive (which is turned into honey) and also to protect the hive.
Back to why the bee dies. The bee’s stinger is barbed, like a fishhook, and when the stinger enters the victim, the bee cannot pull it back out. This way, the venom-pumping stinger attaches itself to the threat and allows the hive to locate it as it moves around. The downside is that when the bee pulls away, its innards remain attached to the stinger. Effectively, its entire lower abdomen is ripped out in an act of self-amputation: digestive organs, muscles, glands, and the likes all are attached to the stinger, and the bee dies an horrific and violent death. The hive, however, is protected, and you run far, far away from the hive due to the pain inflicted by the stinger and the venom.