From Proto-Indo-European to Proto-Indo-Iranian it has been theorized that *e, *o, and the sometimes reconstructed *a all merged into *a (some exceptions such as Brugmann's law--*o > *ā in open syllables--apply). This probably happened sometime around the 3rd millennium BCE when the Indo-Europeans began to split up, with the Indo-Iranians moving towards the Eurasian steppe.
Why does this happen? It could be that the a in Sanskrit, which is [ə] or something thereabouts, is the "easiest" vowel sound to pronounce in that it requires minimal effort to shape the mouth. Because of that, vowels nearby may be inclined to evolve towards that sound. Of course, the same applies to Old Persian and Avestan.
This is not the most satisfactory explanation because it does not account for phenomena such as a turning into the harder-to-pronounce [ɔ] in Eastern Indo-Aryan, but it is generally difficult to account for phonological changes of this manner. This is likely the best we can do.
Interestingly, this is reflected in the Brahmic scripts used for Sanskrit and its descendant languages, which used a as the inherent vowel thereby avoiding writing it every time after a consonant.