EXAPTATIONS. “Examples of classical structural exaptations include the lungs of early fishes, which in most osteichthyan clades evolved into swim bladders for buoyancy control, and avian feathers, which initially arose as thermoregulatory (insulating) structures but now also serve courtship (display) and locomotor (flight) functions.”
https://evolution-outreach.springeropen.com/articles/10.1186/s12052-014-0012-5