In Classical Latin, the diphthongs ae and oe were pronounced as /ai̯/ and /oi̯/, respectively.
Why was the letter e in these cases pronounced as /i/ instead of with an /e/ or /ɛ/?
The sources I remember reading say that in the Classical Period, the pronunciation of "ae" is likely to have been closer to [ae̯] or [aɪ̯] than [ai̯] (the difference between [e] and [ɪ] in the IPA is very small; people don't always agree about which of these two symbols is more appropriate even for vowels in living languages, so it's doubtful that we can determine with certainty the better transcription for Latin).
Part of the reason for thinking this is the change in spelling from the older "ai" digraph. Another reason is the eventual monophthongization of "ae" to /ɛ/ in Romance languages.
I've seen less discussion of "oe" in the literature, as this was a less common sound in Classical Latin, but Wikipedia marks "oe" as "oi̯ ~ oe̯", citing Allen.
I suppose some sources may write /ai̯/ as a phonemic transcription of the diphthong, similarly to how, when we're dealing with Latin accents that had contrastive vowel length, the "short i" phoneme can be transcribed as /i/ even if we reconstruct its phonetic quality as [ɪ]. This doesn't necessarily constitute a claim that a Classical Latin speaker would have thought of the sound as containing the independent vowel /i/, any more than transcribing the English diphthong in the word "price" as /aɪ/ constitutes a claim that an English speaker thinks of the sound as containing the vowel found in the word "kit".