Is THC a defense mechanism for the marijuana plant?

Why is THC in marijuana? Is it a poison defense? What use is it to the plant?
3 answers 3