I can't speak for all areas, but in my area, you use black pipe to within a couple of feet or so from the appliance, then a shutoff valve followed by flex line. I can imagine how something like a kitchen stove that was recessed between cabinets could be plumbed otherwise, and without flexibility, it seems to me any appliance would be very difficult to install.