Because the steam expands and raises the lid, so that it can escape.
If the lid were fastened down, what would result?
The steam, in trying to escape, would burst the tea-kettle.
Why does water run out of the spout of the tea-kettle?
Because the steam in the tea-kettle presses on the water with force enough to cause it to run out.
Why does steam burst vessels in which it is confined?
Because the vessels are not strong enough to keep the steam from expanding.
How is the boiler of a steam-engine kept from bursting?
By means of a safety-valve.
What is a safety-valve?