People learn the hard way–ruining some good meat in their smoker by leaving on the bark. They save the pieces with the bark on and use for grilled meat. Seems to work fine there where they are depending on burning the wood to coals instead of smoking.
You can use some woods green for smoking, but under no circumstances should you use green mesquite for smoking. It will produce a bitter taste in the pit for years that cannot be sandblasted out. People have used this before because they saw someone in a restaurant using it. That was grilling with it, not smoking.
Some recommend that the beginning barbecuer use only seasoned wood until he or she gets some experience in smoking with a wood-burning smoker. Using green wood without knowing what you are doing is a quick way to ruin barbecue.