Sorry, not legally required, but “required” as a safety measure.
There is a good chance that you also had a range hood installed, one that carries fumes and pollutants directly outdoors. When cooking with gas you should keep the exhaust fan on, as recommended by the Center for Disease Control.
the average level in homes that do not use gas ranges run from 0.5 to 5 ppm. This number jumps to 5 to 15 ppm in homes with properly adjusted gas ranges and in the case of poorly adjusted gas ranges, it can be 30 ppm or higher.
Every gas stove sold in the last 20 years would have a large warning label in big bold red letters prominently plastered on it saying the fan must be on during use if this was such a concern. I haven’t seen such a label. Besides, many fans don’t vent to the outside anyway and just have a filter and recirculate the air.