codah, It only shoots right away if greater than cooldown time has passed, you wont shoot right away if you shot 0 seconds ago, you'll have to wait the length of the cooldown, but if you havent shot for 10 seconds, you wouldn't expect to wait possible the entire duration of a cooldown for your first shot.
imagine you had a gun that could only shoot every minute, if you used every "60" seconds, then if the timer was at 61 seconds, and you clicked, you wouldn't shoot a bullet for a whole minute, and would have to be holding the key down for 59 seconds until you shoot, even if you haven't shot once. by using a variable, if your weapon is "cooled down" for the required length of time, then you don't have to arbitrarily hold down the key till the timer hits some value, you'll fire, and then youll have to wait, and youll fire again, etc. Reloading takes a set amount of time after firing your first shot in a series of shots, it doesn't make you wait a random amount of time based on the game timer before being able to fire.