Actually, the THC containing oils are concentrated in the flowers because they provide protection from UV damage to genetic material. That's why plants that evolved naturally at high altitudes and/or low latitudes have more of it
*Mental note - prevents sunburn - another virtue of the plant.