When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
It's part of the system to stop fuel vapour from the fuel tank being vented to atmosphere. The carbon in the canister absorbs the vapour from the tank when the engine is off. The ECU then controls a valve to release the vapours into the engine when the engine is running and when the running conditions are such that the vapour will not cause excessive emissions.
Just as you shouldn't vent engine breathers to atmosphere now.
Although some do.