damn buddy, you can even just type tar, and marijuana on google if you dont understand how there is tar, its created when burning the bud from the combustion creates carcinogens, vapourizing is the only way to avoid this.
"There are over 400 chemicals that have been found in marijuana smoke. Benzyprene, a known human carcinogen, is present in marijuana smoke. Regardless of the THC content, the amount of tar inhaled by marijuana smokers and the level of carbon monoxide are 3 to 5 times higher than in cigarette smoke. This is most likely due to inhaling marijuana more deeply, holding the smoke in the lungs and because marijuana smoke is unfiltered."