I almost hesitate to ask this, because it is hard to believe no one else asked it; but it isn’t showing up in the “similar titles” list.
What is special about ‘C’ that switches the ‘IE’ immediately following it?
Basically, English vocabulary is a mix of mostly proto-Germanic and proto-French, the languages in use by the Saxons and Normans respectively during the Norman invasion and occupation of the British isles. To this was added hefty dashes of classical Latin and Greek, and then Romanizations of words from all over as words were borrowed from British colonies and from American immigrants.
Anyway, in German, the rule (when explained to native English speakers) is that when I meets E, the second vowel is the sound of the pair, and is sounded long. So, EI is sounded like “aye”, and IE is “ee”.
In French, it’s not so simple, but usually, IE is “ee” and EI is “ey” (long a). It’s really closer in most cases to “eh”, but that’s far more open than the “eu” or schwa sound that is an unattended “e”.
So, from both these languages, when “ie” is a monopthong (or “digraph”; two letters making one sound), it’s usually “ee”, and then “ei” is normally given its French pronunciation of long “a” or similar (as in “neighbor” or “weigh”), with a few exceptions usually given the Germanic long I.
The mixing in of C also appears French; the word “deceive”, for instance, is rooted in the old French deceivre, identical in meaning. The French would use their normal long “a” pronunciation for “ei”, but in the transition to modern English it became “ee”. Words such as “receive” and “ceiling” also have ties to French, though sometimes, as with “ceiling”, the spelling in the other language isn’t anywhere close.
So, that’s the origin of the rule; when I and E meet to say “ee”, both of English’s parent languages usually indicate “ie”. The “except after c” is because we Anglos butcher the French contribution so badly, and the “or when sounded as ‘ay'” is for the rare occasions we get it right.
Now for why it’s not such a great rule:
The largest section of exceptions to the full rule, “I before E, except after C, or when sounded like ‘ay’, as in ‘neighbor’ or ‘weigh'”, is when “ie” or “ei” is not a digraph, but instead a diphthong. The word “science”, and its various derived words, do not have their “ie” pronounced as long “e” OR long a; it’s two elisioned sounds, “eye-eh”. Same with “conscience”. Similarly, words like “deity” are pronounced “ey-ih”, again pronouncing each letter. Most of these are from base Latin or Greek roots instead of French/German.
The second biggest group of exceptions are words that have evolved multiple acceptable pronunciations: “either” can be pronounced “ee-ther” or “eye-ther” depending on dialect. Similarly, “neither”, “geisha”, “leisure”, “weird”, etc. all have multiple acceptable pronunciations of the digraph.
Recent additions to the English language, borrowed from other languages, are likely to also be exceptions to the rule; “gneiss” for instance.
Finally, the plural form of a word ending in “cy” such as “fancy” or fluency” is always spelled with “cie” (“fancies”, “fluencies”).