Why is "irreparable" spelled without an "i"?

Solution 1:

Both words were borrowed from Latin via French.

The Latin verb is reparare. In modern French, it is spelled réparer; in Old French, when it was borrowed by English, it was reparer. The English word is first attested in the 14th century. Early forms in English were repare, repayre, repeire, repeyre, and repaire, probably because those all sounded very similar, at least in some periods.

As to why English eventually chose repair as its standard form, I don't think we know; it just "happened".

The word irreparable was also borrowed from Latin (in-/irreparabilis), via French irreparable, the French word first attested in the 12th century, the English in the 16th. It was sometimes also spelled irreperable in English, which probably also sounded similar.

As to why the ai spelling never occurred, we don't know. Perhaps it was because it is a long vowel, which is less likely to occur in unstressed syllables like par in irreparable, as opposed to stressed pair in repair.

Another hypothesis (of mine) is that in English the verb was confused with and fused with English repair "retire", from Latin repatriare ("return to one's fatherland"), via French repairer, which is semantically close and phonetically very similar, if not identical. Another, common word that pressures one into this direction is pair.