The highly recommended R/R:
Bad Voltage Regulator ...OR?
*****
The canister is a mechanism to meet the US anti-pollution laws, which contain restrictions on many substances, including volatile hydrocarbons.
By design, we use gasoline for fuel, the very volatility of which is fundamental to the running of the engine.
Trouble is, the gasoline doesn't know what is its purpose, and wants to evaporate all the time, whether the engine is running or not.
The canister system as installed on our American bikes (and many vehicles for that matter) has a vent line from the fuel tank as its input, and prevents gasoline at rest from venting into the atmosphere.
At ambient temperature, an equilibrium is achieved between the fuel vapor leaving the tank, and fuel vapor going back to the tank.
By design, when the engine is running, by some logic in the ECU, a valve is opened at the canister, to permit the collected vapor to run into throttle bodies and hence into the engine.
When removing the canister, one must allow the tank to vent to the atmosphere, and effectively plug the other lines.