There is no rule that q must be followed by u in all circumstances. This is merely true in the vast majority of circumstances, and it goes back to Latin.
The early Latins had three different letters for the [k] sound: C K Q. However, they only had one letter to represent the [u] and [w] (or [v]) sounds: V. It became customary to write the sequence [kw] (which is fairly common in Latin) as QV and all other instances of [k] as C. (K dropped out of use in most words.) This usage survived into most other European languages that were written with the Latin alphabet, though eventually the letter V was differentiated into U and V, and the accepted spelling of [kw] became QU.
Words spelled with Q without U are generally more recent additions to English, and often represent words borrowed from Semitic languages. Those languages are written with non-Latin alphabets and often have more than one [k]-like sound. When transliterating these scripts, K is usually used for [k], and Q for another sound such as [q], a uvular, "guttural k". In romanizations of Chinese Q is also used for a sound similar to the English "ch".
One could equally ask why isn't coffee spelled coffea, coffe, coffi, coffy, koffee, or kaffe?
The word "coffee", pronounced /ˈkɒf.i/, is said to be a loan word from the Dutch koffie. Which begs the question why the dark red-brown beverage isn't spelled koffee or koffie with a “k”.
In Italian it is pronounced /kaf'fɛ/ and spelt caffè, and etymologists claim it was derived from the Turkish pronunciation of kahveh. The letter -k, along with j, w, x and y do not form part of the Italian alphabet which has 21 letters, consequently the -k plosive is usually represented by the letter -c. It is, therefore, most likely that the English spelling for coffee was influenced by its Italian counterpart caffè.
'Qahwah’ is the Arabic term for the coffee drink, and while scholars
disagree on the exact link that led to the English word “coffee”,
there is no doubt that it was an Arabic word with some connection to
‘Qahwah’. It is generally agreed that the term coffee found its way
into European languages in about the 1600′s, most probably from the
Italian term “caffe” which was derived from the Turkish pronunciation
“kahveh” of the Arabic word ‘Qahwah’ (قهوة).
source: Quora
Interestingly, in German it is written kaffee, which suggests that the Arabic vowel sound ă most resembles the pronunciation of a as pronounced in Italian. Sylvestre de Sacy in his Chrestomathie Arabe (1806), believes the word kahwa, synonymous with makli (roasted in a stove), holds the key to the etymology of coffee. Jardin in his Le Caféier et le Café (Paris. 1895) is convinced that coffee is derived from an Arabic word, be it kahua, kahoueh, kaffa, or kahwa, and different nationalities have adapted the Arabian terms to match most closely their pronunciation.
Here below is a chart listing the different translations for the term coffee.
An alternative explanation could also lie in the pronunciation of the last two letters in koffie, -ie is often pronounced the same as -ee. In fact the following combination of letters; ea, ee, ei, ie often share the same pronunciation, the long e: /i/
In Italian the coffee plant is called Coffea arabica, which is exactly the same term used in English. Note the -ea spelling.
Coffea arabica /əˈræbɪkə/ is a species of Coffea originally indigenous
to the mountains of the southwestern highlands of Ethiopia. It is also
known as the "coffee shrub of Arabia", "mountain coffee" or "arabica
coffee". Coffea arabica is believed to be the first species of coffee
to be cultivated, being grown in southwest Ethiopia for well over
1,000 years. It is said to produce better tasting coffee than the
other major commercially grown coffee species, Coffea canephora
(robusta), because robusta cherries contain twice as much caffeine as
arabica.
There is some evidence to suggest that the term coffee was loaned from the Italian caffè and not from its Dutch equivalent koffie. The author in The Oriental Herald... (1827) speculates that it was first introduced to Venice by Pietro della Valle, in a letter written from Constantinople (today, Istanbul) dated 1615. This date is confirmed by Etymology Online's entry for cafe derived from the the French term café.
A 1673 education manual for Young Gentlemen uses the term coffy-house and in the following excerpt, dated 1710, we see the same spelling repeated.
However, it was today's spelling convention that was by far the most common, barring the norm for capitalizing common nouns which ended by the late 18th century, this 1680 link proves that the spelling of Coffee had already been established. Google Ngram appears to confirm between 1620 and 1750 coffee was the preferred spelling. Further proof that the the vowel /i/ represented by double -e had been standardized before the late 17th century is seen in this pamphlet dated 1674, printed only twenty-two years after the first coffeehouse in England had been opened.
Best Answer
I consulted Jesse Sheidlower, an editor-at-large for the Oxford English Dictionary. He said that my characterization of the Middle English form as having been peple or peeple was incorrect, and that “Middle English had a tremendous number of spellings”, the ‘eo’ form among them. So my idea that the ‘o’ was dropped and later revived is certainly wrong. Rather, the many other forms died out, leaving only the ‘eo’ form that we still have. Mr. Sheidlower says “it's not clear why the 'eo' form became the standard one”. It seems likely that there is no definitive answer to the question of why ‘people’ now has an ‘o’.