Good question, which was raised during a discussion of Tony Blair’s legacy on Facebook, which, as it turns out, isn’t only for watching cute kitten videos.
In English, Iraq is far more used than Irak, which is the preferred spelling in French, most notably in publishing heavyweights such a Le Monde and Le Monde Diplomatique. I’m more used to the Irak spelling, so I wondered, why q?
It turns out that the q is a Roman transliteration which indicates a different version of the phoneme /k/ in Arabic, which comes from far back in the throat (lingual-glottal). As neither language has a specific letter for it, the Roman transliteration uses a q to indicate a slightly different sound; the same goes for Qatar. This is how جمهورية العراق, or Republic of Iraq, is pronounced in Arabic.
So, what’s a French girl to do? When it comes to toponymy, French has a habit of messing with foreign names, and q or k, I’ll still pronounce it /k/, but I quite like consistency and I can’t imagine spelling Qatar Katar, so I think I’ll use Iraq from now on.