What you inhale gets into your bloodstream via the capillaries which surround the alveoli, after which the blood returns to the heart and gets pumped out through the aorta into the peripheral tissues. The blood which goes to the lower extremities through the descending aorta is filtered/processed by the liver when it comes back through the venous circulation on the way back to the heart, but the blood which goes to the upper body through the ascending aorta just comes back into the heart through the superior vena cava without going through the liver.
The liver is important because it contains a large family of cytochrome P450 enzymes which can oxidize most of the xenobiotics that you ingest, which makes them more water soluble (better to excrete in the urine) and also detoxifies most of them. A small number are actually made more toxic by P450 reactions, such as the classic liver toxin carbon tetrachloride, which is only toxic after a P450 enzyme oxidizes it to a highly reactive free radical species. But on the whole, your liver saves you every day, and when you have liver failure, you are in trouble in so many ways.
What you eat is absorbed by gut epithelial cells, picked up by local capillaries, is taken by the portal circulation through the liver, then back to the heart. So all of what you eat is quickly run through the liver, while maybe half of what you inhale is filtered by that organ on the first pass. And we aren’t even considering THC and its derivatives being sequestered in other tissues as it moves about the body. Or metabolized by other cells.
Not simple pharmacology here.