The original lyre and hifin genes are, as with all abnormal genes not normally found in the wild (natural selection. would a hifin or lyre swordtail have better survival chances in the wild? NOT from predators but maybe in sexual selection), nothing more than mutations. In a domesticated environment, people breed a lot, so the rate of such mutations showin up are greater. Then they preform selective breeding for whatever traits they want, such as the lyre and hifin.
To be noted: almost all swordtail variations have already been discovered and bred for.