Widespread changes scattered across the genomes of distantly related species crafted the trait