Canonically, S-foils are featured on many ships, and help with temperature regulation, stability in atmosphere, and altering the range of fire for weapons systems. X-Wings weren’t the first ship to have them, either, with ships using them as early as the Clone Wars.