It prevents fuel vapors from exiting the vehicle. It's an "evaporative emissions control". Unburned fuel vapors are, in some ways, more toxic than exhaust fumes.
The charcoal is employed in such a way that it stores the gasoline in a non-combustible state until the engine's able to pull from the canister via the purge line. The canister's inlet provides clean air to dilute the vapor, expedite the purge of the charcoal's contents and to prevent vacuum from building in the fuel tank.
In most states and/or counties emissions testing includes pressure testing of the gas cap and inspection for the presence (and sometimes even the functionality

) of other evaporative emission control devices... such as the charcoal canister.
Additionally, even if there is no required emissions testing in your area it's still illegal to modify the factory placed emissions control system... those requirements are placed by the US gov't and your local laws do not supersede them.
There, that said, do as you see fit. But if you do feel it necessary, do it right.