Don’t you think the letter x looks a bit like two crossed swords? And the sound it makes – /ks/, like the sound of swords clashing. If they ring a little after, or slide one along the other, you might even imagine that the sound could be like /ksɪf/ – you might spell it xif, but why not go the extra bit fancier and make it xiph? Look, if the word phonetic isn’t going to be spelled phonetically…
Anyway, when the Latins were borrowing words from Greek, the Greek letter phi ϕ was rendered as ph rather than f because its sound was not actually the same as that of the Latin f. But they kept the xi ξ as x, since both languages had letters representing /ks/ as a coarticulated unit. Even at the beginnings of words. That set the pattern for the Greek ξιϕοειδής xiphoeidés, from ξίϕος xiphos “sword” and εἶδος eidos “form”, to become (actually in comparatively modern times) Latin xiphoides, whence we get English xiphoid.
And in Latin, this xiph would have been perfect – no need to fix it at all. Good look, good sound. An improvement over the Greek in the written form; that xi ξ looks like not a sword but a snake, although the phi ϕ does look a bit like a sword cutting something in two.
But in English we have the idea that we can’t start a word with a stop followed by a fricative. We need fricatives first: /sk/ is fine, /ks/ not at all. People have the idea they can’t even say it (except that you will often hear except reduced to /ksɛpt/). So we go with the /z/ sound, and the best you can say in terms of ensiform iconicity is that it’s reminiscent of Zorro.
Ensiform? Oh, that’s the Latin word for “sword-shaped”. Yeah, really. Biiiiiig yawn. Just makes you think of ensigns and such like. Give me xiphoid any time. Not that the two words are used for exactly the same things; xiphoid is usually used in anatomy, for instance to refer to lower end of the sternum (breastbone). It’s true that words such as xiphoid have likely caused many foreign English students to chew through their pencils, fingernails, desks, what have you: how in heck are you supposed to remember these bizarre caprices of spelling?
But don’t fall on your sword (your xiphoid might interfere with that anyway). As if! You’re better off swallowing it. Aside from getting away from the front of the mouth and perhaps closer to the original /ks/ sound as your tongue closes, back to front, on the steel, you will give me the opportunity to confect the word xiphophage, a heretofore curiously unused term for a sword-swallower. But be careful not to confuse it with xiphopage or xiphopagus, an existing term for conjoined twins joined at the bottom of the sternum – the xiphoid.