Actually both were created with the purpose of finally fusing Gaia and Terra together and restoring the Terran population, though neither of them care to do that in the end. Zidane lost his memories and upon finding out about his origins decides Garland and the people of Terra are wrong for trying to fuse the two worlds and Kuja doesn't want to follow the script Garland wrote for him, he has no intention of destroying Gaia, he is just using the people of Gaia to gain the strength needed to defeat Garland (i.e the Eidolons).
Zidane doesn't turn against the Genome, in fact he saves the Genome from Garland and the destroyed Terra and they end up living with the Black Mages in Black Mage Village.
