Gas cans must be vented to be safe. The vapors created by the fuel expand and contract inside the can. Those vapors can build up such pressure that they can explode. This expansion is caused by temperature fluctuations. The vent is also opened when you are pouring fuel into a vehicle to prevent an explosion or accident while you refuel.