the resin glands arnt there to kill off bugs. its there to catch pollen from a male cannabis plant. when the female plant really starts to get desperate for some pollen they just grow their buds bigger for a better chance of getting pollenated. as far as thc gos i dont know if that is a defense against animals or what. i have heard one theory that thc is produced by cannabis because they know we like it. and they know if they have something we like, we will take care of them and help them survive.