There doesn't seem to be any clear reason. The OED implies that the word could be spelled with final e in some forms of French as well:
< Anglo-Norman engine, enginne, engynne, ingein, Anglo-Norman and Old
French engign, enging, Anglo-Norman and Old French, Middle French
engin, engien (French engin)
But it's unclear how much this might be responsible for the English spelling. The "e" might also just have been meant to indicate vowel length; the vowels in French loanwords were often perceived as long. Similar cases are use, for which the OED says "< Anglo-Norman eos, heus, huis, oes (masculine), use (feminine), Anglo-Norman and Old French hus (masculine), Anglo-Norman and Old French, Middle French us" and ace, from French as. It would not be unexpected for a originally long vowel to be shortened and reduced in an unstressed syllable.
The OED does list some early spellings that seem to indicate a reduced pronunciation, such as "ME–15 engen". But, it also cross-references the entry for ingine which is currently pronounced /ɪnˈdʒʌɪn/, and describes the latter as a variant of engine. I would guess there was some variation historically in the pronunciation of this word that later got leveled out with the rise of standardization. As I mention in my answer to this related question, Why does the suffix of "iodine" sound different in American and British English?, the sequence "ine" at the end of a word can correspond to various pronunciations with no apparent pattern.