Some insects contain chemicals that make them not taste good.  A few of these chemicals are actually toxic or otherwise biologically active.

Many insects are used medicinally in different parts of the world.

Bamboo worm eaten in Brazil.  A caterpillar, it grows to 10cm long. When eaten for food, pull out head and intestine and discard.  If leave it in, you fall asleep for an entire day, have vivid pleasant dreams.  Similar to opium.

Diving beetles used in East Africa by young girls.  Their venom contains steroid hormones.  They get it to bite their breasts and they grow bigger.

Spanish fly, actually a beetle, commonly used aphrodisiac.  Quite toxic in larger doses.  The Marquis de Sade got in trouble because of this.