However, the cases have completely different functions, and the form of the accusative has developed from *-(e)m. (The same sound change has developed into a synchronic mutation of a final m into n in Finnish, e.g. genitive sydämen vs. nominative sydän.) This homophony has exceptions in Finnish, where a separate accusative -(e)t is found in pronouns, e.g. kenet "who (telic object)", vs. kenen "whose".
The same sound change happened with eka and hertõ which resulted in jag (I) and hjarta (heart).
The unusual pronunciation versus spelling of who is because the vowel was formerly /aː/, and thus it did not undergo the sound change in Old English, but in Middle English (following spelling change) the vowel changed to /uː/ and it followed the same sound change as how before it, but with the Middle English spelling unchanged.