Conifers — which include pine and fir trees — are veritable chemical weapons factories. The evergreen smell of Christmas trees and alpine forests while they may smell delightful, these chemicals’ main purpose is to trap and poison invaders.
https://www.sciencenews.org/article/bark-beetles-fungi-chemical-signals-infest