The dashing image of First World War fighter pilots wearing long silk scarves had nothing to do with fashion.
The open-cockpit biplanes were very primitive with no rear-view mirror, so the pilot depended entirely on his own vision to avoid or mount an attack.
The scarf was used to wipe grease from his goggles and to keep his neck from chafing against his collar as he constantly turned his head while watching for the enemy.