<ie ⟷ y> before the ·ing suffix
It's not a matter of "necessity" per se: the spelling conventions that happened to become standardized for English are largely arbitrary.
I think the following tendencies lie behind the spelling alternations for words like die and try (none of them are very strongly synchronically active):
-
Word-final "i" is strongly dispreferred. Therefore, in most words where it would occur, "y" is used in its place (e.g. cry, rely, copy can be thought of as "standing for" *cri, *reli, *copi).
-
Non-grammatical words tend to have spellings that are more than two letters long, so words that end in an "i" sound and would otherwise be spelled with only two letters are spelled with a "silent e" at the end: e.g. die, lie, tie, vie, pie. A few words end in -ye instead of -ie: rye, dye, lye.
-
Silent e is usually present or added between an i (word-finally, -y) and the suffix -(e)s.
This seems similar also to the use of -es in the verb forms does, goes, and various noun plurals in -oes.
-
Silent e is usually absent or "dropped" before the suffix -ing.
This is more of a default, rather than a strong dispreference for words ending in eing, and there are multiple exceptions that I have already tried to cover in an answer to a previous question: Is "ageing" the only exception? Other suffixes that show similarly variable behavior are (e)y, (e)able, (e)ish.
-
the sequence "ii" is strongly dispreferred and so "y-ing" is used in place of "i-ing"
Both the dispreference for word-final i and the dispreference for ii might be related to the concept of "minim letters" and the idea that in certain types of handwritting these letters are less visually distinctive, especially when they occur in sequence, than other letters.
As I said, these are obviously not hard constraints on contemporary spelling so there are plenty of words that don't follow these tendencies; e.g. ski, skiing, Latinate plurals like radii, abbreviations like bi.