Tchrist's answer citing the Oxford English Dictionary pretty much says it all (so please vote for it so that it will move higher up on the page!), but I thought I'd post an answer with some useful supplementary material, as I feel the need to respond to some egregiously incorrect statements in other answers on this page.
Here is a Grammarphobia blog post on the subject: A pronouncing primer.
The word for the elementary textbook was pronounced with a short “i”
(rhyming with “trimmer”) when it first showed up in English in the
Americans still pronounce it that way. But in the late 19th century,
the British began pronouncing it with a long “i” to rhyme with “timer”
and that’s now the usual pronunciation in the UK, according to the
Oxford English Dictionary.
But English speakers on both sides pronounce “primer” with a long “i” (as in “timer”) when it’s used in other senses (such as an undercoat of paint or a cap used to ignite an explosive).
That suitably describes the current pronunciations and their geographical distribution (although it fails to mention that currently, some Americans also rhyme it with "timer.") It also describes the historical fact that the pronunciation with a "short i" is older than the one with "long i" when referring to a textbook. Both pronunciations are reasonably natural. Neither is a "corruption" (a useless term in linguistics – save it for politics and computer science).
The earliest example for the textbook sense is from “The Prioress’s
Tale” in Chaucer’s Canterbury Tales (circa 1390): “This litel child
his litel book lernynge, / As he sat in the scole at his prymer.”
Note how little (relatively speaking) English spelling has changed since Chaucer's time. You can probably tell what it means easily although he'd have pronounced it quite differently. Note also that vowel length is inconsistently indicated, and short vowels are not always marked with doubled consonants. The word little used to be spelled "litel," but we don't pronounce it as "light-el" today. Little has been respelled with double letters in modern English, but many other words like body, camel, model and primer have not. Heck, the word gamut is spelled with a single "m" even though based on the etymology and pronunciation it "should" have two! Modern English spelling doesn't perfectly reflect either current pronunciation or historical pronunciation (or etymology, for that matter).
Primer is etymologically related to prime, but alternations in vowel length are common in etymologically related words. Another word related to these two with a short /ɪ/ is primitive. More distantly related are prince and principal, which aside from having /ɪ/, also show a change of m to n before the consonant c.
So, just why is the vowel traditionally "short"?
Moving on to the actual question: why does the historical pronunciation have /ɪ/? It's a difficult question, which is probably why none of the previous answers have really addressed it.
I don't have enough knowledge to confidently state the answer, so all that follows is just speculation. However, I will reference facts I found that seem relevant.
First, the general tendency in English for vowels to be "long" when written before a single consonant followed by another vowel seems to stem from the historical process of open syllable lengthening. Here is Wikipedia's description of the process:
Around the 13th century, short vowels were lengthened in an open
syllable (i.e. when followed by a single consonant that in turn is
followed by another vowel). In addition, non-low vowels were lowered:
/i/ > /eː/, /e/ > /ɛː/, /u/ > /oː/, /o/ > /ɔː/. This accounts, for
example, for the vowel difference between staff and the alternative
plural staves (Middle English staf vs. stāves, with open-syllable
lengthening in the latter word). This process was restricted in the
- It did not occur when two or more syllables followed, due to the
opposing process of trisyllabic laxing.
- It only occasionally applied
to the high vowels /i/ and /u/, e.g. OE wudu > ME /woːd/ > wood; OE
wicu > ME /weːk/ > week. Most instances of /i/ and /u/ remained as
such, e.g. OE hnutu > NE nut, OE riden > NE ridden.
The effects of open-syllable lengthening and trisyllabic laxing often led to differences in the stem vowel between singular and plural/genitive. Generally these differences were regularized by analogy in one direction or another, but not in a consistent way:
- ME path, pāthes > NE path, paths, but ME whal, whāles > NE whale, whales
- ME crādel, cradeles > NE cradle, cradles, but ME sādel, sadeles > NE saddle, saddles
The Oxford English Dictionary's earliest citation for primer is from the fourteenth century, in 1378; unfortunately, I'm not sure how open syllable lengthening applied in that time. Anyway, one interesting point here is the note about how open syllable lengthening generally did not apply to short /i/. This brings up a new question: when the word "primer" entered English, was the vowel short, or long?
On the one hand, many French words spelled with "i" were imported at some time before the Great Vowel Shift with long /iː/, for example, "mitre" and "nitre." However, the history of "primer" seems a little different, as the OED says it primarily derives from Latin primarius. So, it seems plausible to me that it might have had a short vowel from the time it came into English, and according to Wikipedia, it would be regular for this vowel to not be lengthened. That would explain the modern pronunciation.
Alternately, if it did originally have long /iː/ in Middle English, the Wikipedia quote describes another process by which it might have been shortened to /i/: trisyllabic laxing, which apparently would occur in forms like the plural *primeres (hypothetical; I don't know that this form actually existed) and then be generalized to the singular.
In a way, the spelling is stranger than the pronunciation: there are a number of words in English that have unetymologically doubled consonants after a short vowel (such as pillar, summer, hammer, stammer, ridden), but although double mm was used in the past to spell primer, the single-consonant spelling won out for some reason. This allowed the spelling pronunciation /praɪmər/ to eventually become established.