You do this a lot, I've noticed.
I don't disagree with the bulk of this. I was reacting to the theological slant this thread is taking.
Hindsight makes us see an elegant, serene, teleological principle that stands outside of time and herds everything towards functionality. But we're not standing at the end history, of some assembly line. Many of the genes we're transcribing are doomed not because of their disfunctionality, but because some big fucking spacerock'll hit the Amazon, or because some really gradual climactic tilt'll make the oceans anoxic, or whatever. Evolution is an open system, and there are vastly more traits selected by luck than by scarcity.
Yes morphine serves the papaver as pesticide and yes it's important to see DMT as goat roofie (or UV harnesser? interesting). But you have to take human bias out of the big picture. The persistence and incidence of these alkaloids--of any biological product--across any array of species is more precisely accounted for by molecular systematics. Where are the base pair sequences most similar? Where are there gaps? What are the likely reasons one gene remained in the genome of a number of disparate species while another was excised from all but a few?
As more genomes are sequenced and more detail is carved into the phylogenetic tree, I'll bet you this doctrine of metabolic streamlining will get old real fast.