The genetic code's variety comes from the arrangement of four nitrogenous bases into 64 possible codon combinations that encode for 20 amino acids, despite the limited number of bases. The massive number of possible nucleotide sequences accommodates the vast diversity within and among species.