Why does brand-new carpeting smell like green weed?

In my opinion, a completely brand-new, newly-installed carpet smells similar to the tangy aroma of fresh, green, high-quality cannabis buds.

I’ve witnessed countless installations of new carpets, and been present in countless newly-constructed homes with freshly-laid carpeting. And, for some reason, it always has that same smell.

Why is this?

Carpet can contain formaldehyde, toluene, xylene, and benzene, none of which has a pleasant aroma or affect.

But isn’t the OP describing a pleasant aroma?

(I don’t know how pleasant it actually is, as I can’t recall ever smelling brand new carpet.)