In the end, gil and XP are both types of currency if you can lose them in exchange for attempting a fight. I think losing gil is the better choice for two reasons.
First, it provides a controllable gil sink that can help to control the economy. Players getting too rich? Raise repair costs. Players too poor? Lower repair costs. Controllable currency sinks are considered very good things in MMO design, and tend to be pretty important to regulating the long-term health of the economy. Considering that gil storage is essentially "infinite" whereas XP is most-decidedly "finite", the game needs sinks to remove gil from the economy and prevent over-inflation.
Second, it doesn't potentially rob players of skills or abilities if they run low. After all, you want players to learn how to use their abilities, and taking those abilities away if they initially fail is counterproductive and instead teaches them to rely on what they already know rather than learn how to use their new techniques.
Edit: Ramblings on the history of XP loss.
I wouldn't be surprised if EverQuest's implementation of XP loss was inspired by the tabletop RPGs of its time, including Dungeons and Dragons, which caused a character to de-level if they were killed and later revived. In any event, I don't recall XP having any use in EQ except to advance your character level, so losing XP was nothing more than a penalty for failure; and, really, quite a mild one considering that EQ also caused you to drop all of your gear, if memory serves, and required you to loot your own corpse to get it back... or risk losing it to a later passerby.
Really, it's probably fair to say that EQ stumbled on the notion of penalizing a player's time investment in exchange for failure. Why people are so attached to the details of it implementation are beyond me. Time lost is time lost, and I think there's a better fit for FFXIV, and more generally in many modern MMOs.