Why would a venus fly traps mouth that's still "chewing" die?
There are many things that could affect the rotting of your venus fly trap while digesting including: size of the bug, age of the trap, and temperature. 

Sometimes a venus fly trap will turn black and fall off while it's digesting a bug when the trap is very old. As the trap ages, the digestive juices are recycled and as a result form a weaker mixture which slows the digestion process.

The bug it was digesting was also probably very large or had a hard shell inhibiting the trap from properly closing. This allowed bacteria and mold into the trap to digest the insect also proliferating the rotting of the fly trap itself in the process.

Temperature also has an effect on the trap's digestion where higher temperatures speeds up the enzymatic process of digestion. However, this is probably not a factor in your case. 

It's not so much that your venus fly trap decided to give up on the valuable resource, it was either too old to properly digest the bug or it couldn't close properly because the bug was too large that bacteria infested the bug and the trap speeding up the process of the trap falling off the plant.

For more detailed explanation see: http://science.howstuffworks.com/life/botany/venus-flytrap4.htm