As a child I learned the spelling rhyme:

i" before e
except after c
or when sounding like a
as in neighbor and weigh.

This has helped me spell many words according to the recommended standard, including

(i before e)
wield, piedmont, lien, diesel
lenient, piece, mien, lieutenant

(except after c)
ceiling, conceit, receive

(or when sounding like a)
feint, neigh, sleigh

But there are words that dont follow this rule, that dont have a long a sound, and arent after a c", such as
height (sounding like a long i)
seize (sounding like a long e)
sleight (sounding like a long i)

Is there some historical etymological reason behind these anomalies?
For that matter, is there some historical reason behind the rule in the rhyme?
(And does anyone know of exceptions that have an "ie" after "c"?)