Is your water heater located in the middle of your home? If your answer is yes, your plumber should have explained the potential of a flood in the event the gas control valve malfunctions.
Most all new water heaters come with a temperature & pressure (T&P) relief valve installed. Should your gas control valve not shut off when the set temperature is reached, the pressure inside the heater raises as the temperature raises, with the potential of an explosion. The T&P valve is designed to release water pressure in such a case and prevent an explosion.
If your heater is in the middle of your home, the drain coming off the T&P valve may not have been run outside your home. Should the T&P release steamy hot water, without a drain to the outside, that water may wind up flooding the area around the water heater.
Suggestions on how to handle this situation. The best way is to move your water heater to a shed outside the home or to the garage. This way, the drain can be piped to the floor where it will do no harm.
Years ago, the solution was to use a Watts 210 valve where the T&P valve is located. This valve would shut off the gas to the heater should the heater reach a certain temperature. This system also required the use of a pressure relief valve outside the house. Water heater manufacturers now don’t recommend the use of Watts 210 valves, in fact, will void a water heater warrantee if used.