How Did This Bug Evolve?

I saw a science sho, which showed a beetle-like insect that has a unique method of defending itself. It has a chamber in its rear, in which two volitile chemicals are mixes, resulting in an explosion! It literally shoots a cloud of hot gas out its ass! How would evolution come up with such a bizarre adaptation as this?

From Bombardier Beetles and the Argument of Design

In addition to the comprehensive cite by DrFidelius, there is the issue of the concept of “evolution com[ing] up with such a bizarre adaptation”. The talkorigins article discusses this at the very end in terms of complexity arising from the unplanned combination of more simple mechanisms that originally fulfilled some other capacity, but to expand on that, it isn’t as if some creature named “Evolution” consciously decided to try to take disparate mechanisms and weave them into unexpected functions, but rather the case that the original mechanism fulfills some useful need while progressively adapting (via mutation and drift) to some additional capability. Insectoid wings, for instance, almost certainly started out as heat radiators which then provided lift in wind (granting the benefit of externally-powered, if unguided, locomotion), and later developed into the more sophisticated tools of advanced aerial locomotion, while still providing some measure of the original and intermediate capabilities. Natural selection doesn’t prune away to create an optimal characteristic, but rather gloms onto existing features to allow a marginal advantage which leads to preferential propagation of the characteristic in the gene pool and eventual creations of unique, non-interbreeding populations, i.e. speciation.

In other words, there is no ontological or preplanned goal in natural selection, even on the level of individual characteristics. A gene randomly gets switched this way instead of that, and is propagated (nonrandomly) on the basis of the benefit it provides to the carrier and the population as a whole. A sufficiently broad collection of such branches ends up giving you some pretty bizarre “design” solutions that no reasonable engineer or “intelligent designer” would come to by any deliberate process.

Stranger

Actually, it was an Intelligent Design by a Clockmaker who foresaw that Gary Gygax would need inspiration for one of his beasties.