I can understand the point of a sting if it doesn't kill the animal in the process of stinging something, however the bee dies after stinging something/thing.
The only reason for this that I can think of is for the benefit of other bees- if an animal gets stung once, they are likely to leave all other bees alone.
Also, does a bee know they are going to die if they sting something?