For instance in words Iraq and Qashqai? Are there any historical reasons for that?
There are a small number of words and names used in English that have Q but no U and do not correspond to a "kw" sound:
... among others
Most of these have a q because they are words or names that come from Arabic, which traditionally uses the letter Q to transcribe a sound that doesn't occur in English: the voiceless uvular stop, which sounds similar to but not quite like the sound of the letter "K", and is the sound usually used when saying these words in English.
A few of these—those starting with "QI", such as "Qi", "Qian", and "Qing"—come from Chinese, where Q is the letter used to transcribe a different sound—the voiceless alveolo-palatal affricate—which sounds similar to but not quite like the sound of the "CH", and is the sound usually used when saying these words in English.