I'm not a native English speaker and I have noticed that 'e' in some words are pronounced like 'a' by native speakers sometimes. For example, "Texas" sounds like "Taxes", or "Sex" sounds like "Sax" (there's even a wordplay for it), or in the famous song "Shape of My Heart", the word "Meditation" sounds like "Maditation".
Is there an explanation for this?