gas tank vent?

Thanks, is there any particular reason why? I'm guessing so gas doesn't flow out of it?