Nature put a barbed stinger on bees, but didn't intend for the stinger to leave the bee.
On the other hand, the risk of ripping your entrails out while using a sewing needle is quite low.
On the other hand, the risk of ripping your entrails out while using a sewing needle is quite low.
Sticking it into the elastic material that covers mammals is not it's intended use case.
On swarm level it doesn't matter. But psychological effect on an attacker or even group of such is achieved after one event, sometimes even inherited.
In the sense that any natural development is intended, it's intended for the stinger to leave the bee. Compare wasps, which have reusable stingers.
Nature didn't anticipate the hairless apes to get so numerous and infiltrate every environment where bees exist.