Vowel shifts tend to happen over centuries. (I can't explain the "m", though; perhaps a merger with "dem"?) This is just one of the few cases where Swedish spelling doesn't reflect modern pronunciation.