This is pretty far out of my area of expertise. And the evidence for the evolutionary biology is pretty far from exact. The taxonomy on allot of the famalies, genera, and species of reptiles change frequently, and there are allot of theories on the exact relationships.
For example, the green tree python is now most commonly known by the scientific name
Morelia viridis, and some biologists claim the animals on the Aru islands are a separate species altogether,
Morelia azureus. For a long time they were known as
chondropython viridis. And there are subspecies of
M. viridis recognized on mainland Australia. That whole debate could go on for days. And that is just a debate on species and subspecies currently in existence.
Did snakes descend from monitors? Did monitors and snakes descend from the same ancestor in separate directions? Are monitors just a more recent example of convergent evolution? There are no straight answers. And allot of theories. Some become commonly accepted, but there is very little hard evidence for exactly how they evolved. Someone else could say "this is exactly what happened", but I think it is still up in the air.
Not that I have ever put any thought into this or anything.
That is one of the reasons I like all of the reptiles of the Indo-Australian islands. It is an amazing reprisentation of convergent and divergent evolution. All of the subspecies of carpet pythons,
Morelai spilota sp., in themselves, are amazing. Plus all the other python species. The monitor lizards, the komodo dragon,
Varanus komodoensis, the perentie,
Varanus giganteus, the crocodile monitor,
Varanus salvadorii, and the black tree moitor,
Varanus beccarii, just to name a few,are fascinating.
I could bable on for days, but this is pretty far from pet related...