This was already discussed very recently. Look at other threads, I forget which one. Basically no one knows but it has nothing to do with supernatural phenomenon (if thats what your getting at ????) there are many logical reasons DMT would be found in plants. It acts as a natural insecticide is one of the most likely. So long as something doesn't harm the plant it doesn't have to have a reason for being there.
Many people have a misunderstanding of evolution. Things don't evolve towards something or have specific reasons for evolving. Things natural change (mutate) and nature favors certain mutations. We can only explain why a certain attribute is favorable in that environment.