Q:Why are melaleuca weevil larvae gooey?

A: That goo is their defense, and they appropriate it from melaleuca trees. In a more thorough explanation, melaleuca trees produce certain chemicals (called terpenoid compounds) that deter insects and other animals from eating their leaves. In a closely-evolved relationship, the beetle larvae ingest these compounds as they eat leaf tissue, and exude them through their bodies as their own defense against predators.