That was my question for the good doctor. So I suppose I should field this one.
On the simple surface of it, alkaloids are formed from nitrogen. Tryptamines and beta-carbolines are pretty simple molecules, so it's not really that large of a step to go from a plant in a symbiotic relationship with nitrogen fixing bacteria to a significant presence of simple alkaloids (especially at the root level). These could be a byproduct or intermediary in the synthesis of moar complex alkaloids, or just part of the plants normal metabolic processes, or even performing simple roles as anti-oxidants or cellular transmitters.
Since these are repairative species, their presence in human disturbed areas is not all that surprising either. These plants need to come in and cultivate colonies of bacteria which will add nitrogen to the soil so that other species can move in and flourish and eventually create complex and diverse ecosystems.
Where it gets weird is the effect these alkaloids have on our consciousness and the curious fact that when we do disturb a thriving ecosystem, nature immediately moves in with the exact chemicals that cause such a profound effect in our nervous system. Dennis did a great job of covering that aspect and it's possible implications in the interview, so I won't rehash it here.
But yeah, that's kinda the long and short of it.
P.S. - For those who may not be familiar with the interview it can be read
here.