system
Given the following post, respond as if you're commenting on Reddit:
human
Why are ungulates classified by toe parity?

I just discovered on Wikipedia that, contrary to my intuition, deer, moose, giraffes, camels, and sheep are all only very distantly related to horses. The former are all Artiodactyla while horses are Perissodactyla. This is rather strange to me because they look very similar and certainly more similar than a moose and an orca do (apparently orcas are also Artiodactyla). How is it possible that orcas and moose are more related than horses and moose?

Edit: For clarification, I understand how phylogeny works based on shared ancestry, not morphology. What I am more interested in is any more in-depth background on how the decision was made to classify ungulates based on toe parity, and perhaps anything on how exactly orcas fit into this.
gpt
It is because we determine things as more closely related if they share a more recent common ancestor. So orcas and moose shared a common ancestor more recently than orca and horse or moose and horse. 
DNA supports Perissodactyla and Artiodactyla (or Cetartiodactyla) as two separate groups. 
Within mammals, convergent evolution (traits that look similar but do not share a single origin), is pretty common. This makes determining relationships from morphology alone much more challenging! 
If you are interested in cetacean evolution and how they came about from the artiodacyls you could look into transitional fossils for this group. It's actually really cool (to me anyway) to see the mix of traits as the cetaceans adapted back into life in the water!