My parents used to have an old cooker which rather than having a spark button, had individual pilot lights for all of the hob burners and the grill. My mother was forever worried about whether one of the damn things had gone out (which they occasionally did). I think if you switched the supply off, switched it on again, and someone has left their house for a week, it might build up a significant amount of gas. Although they are supposed to be small enough not to. Presumably there were hardly any of those left now, but they can't assume they're all gone.
That is an insane solution to the problem. I’d rather put a match to it.
Pilot lights are often designed so that the heat from the flame holds a bimetallic switch in the open position. Should the light go out, the bimetallic switch will shut as it cools.