Centuries-old sound change.
The spelling is deliberately historic, so it preserves distinctions that are no longer made in speaking.
(A bit like in English, where we still spell "meet" and "meat" differently even though nearly all speakers have pronounced them identically for centuries.)
For further information about the pronunciation see the Tips & notes on the Homepage right under the list of lessons. Basically each letter in Greek has one distinct pronunciation. αι is one of the few exceptions.
Also see here for resources there are even some with the sounds of the Alphabet.