First of all, when verbs pluralize, they do not follow the rules for noun pluralization. The plural form of "fly" is "fly", not "flies". Consider this:
He flies away.
They fly away.
"Fly" is clearly the plural verb, while "flies" is the singular.
There is no reasoning why words ending with "y" are treated differently from other words ending in other letters. It is just a case of rules, and rules don't necessarily have reasons. For example, why add "s", for pluralization? why not add "e"? No reason! It's just a grammar rule.
The reason they become "flies" instead of "flys", is due to the fact that the "y" is not preceded by a vowel. When verbs end in "y", and they are preceded by a consonant, such as "r", their singular form takes the form of "-ies", such as "flies", "cries.". However, when the verb ends with "y", but the "y" is preceded by a vowel, "s" is just added. Examples are "Play/plays", "buy/buys".
This rule applies to both nouns and verbs. When nouns ending in "y" pluralize, the form they take is determined by whether they are preceded by a vowel or a consonant. When verbs ends in "y" singularize, whether they just add "s", or become "-ies" is decided by whether the "y" is preceded by a vowel or consonant.
This site states the rules:
If a verb ends with a vowel before -y, we just add -s for the third person singular:
If a verb ends with a consonant before -y, we remove the y and add -ies for the third person singular:
If a noun ends with a vowel before -y, we just add -s for the plural:
If a noun ends with a consonant before -y, we remove the y and add -ies for the plural
Verbs work contrary to nouns.