As it turns out, the answer is on par with Darwin's original thoughts on the matter of morphological novelties: natural selection. More specifically, it’s probably been the constant adaptation of its prey to the increasingly deadly toxins within the venom that has caused it to become so virulent over time. Often within genetics, changes come from duplications to the same genes or loss of said genes. In this case, there has been a massive example of duplications. We can see this within the genome most drastically in the 3FTs, which has duplicated over twenty times since the king cobra split from its non-venomous common ancestor, the Burmese python. The genes that now operate almost exclusively within the venom gland (and the accessory gland a bit, though the role of this organ is unknown) seem to have come from the pancreas, meaning that what were once average molecules used for bodily functions have been adapted to a new use.
But how does all of this help human beings as a whole? Well, now we have a fundamental understanding of the venom's creation. This will inevitably give us a better edge against the hurdle that is creating antivenoms in the future. We also now know how novelties like this can arise and come to exist, as there is no obvious rhyme or reason behind hollow teeth connected to two deadly glands full of mutated pancreatic compounds. Hopefully this knowledge will be expanded in the future, as technological advances continue.
Original article: http://www.pnas.org/content/110/51/20651
Author: Colby M. Ells