What is a vertical spring loaded beam at the gas stove top?

Just moved into an empty house and checking the gas stove. However, nothing works and I noticed the stove top have some kind of a spring loaded vertical beam that's likely to get pushed down if you put the pan on top of it. I wonder if this is a safety feature?

by craigtrick