Left-side mouth radical — the indexing radical. The mouth signals that 哎 is a vocalization, an exclamation. Same family of interjection chars filed under 口: 啊 (ah), 哦 (oh), 嗯 (uh-huh), 呀 (ya), 哇 (wow). All are sounds the mouth produces.
Right-side 艾 supplies the sound — ài shifting to āi in 哎 (just a tone change). 艾 itself names mugwort, an herb burned in moxibustion; no semantic link to the exclamation. Pure phonetic borrowing. Same phonetic family: 唉 (sigh), 爱 (love, near-homophone).