There seems to be little predictability to the English names for the letters of the alphabet, to say nothing of the names of letters in other languages. Some begin with an e-as-in-egg sound (eff, ell); some end in an ee sound (tee, dee); and others have no obvious rhyme or reason to them at all. How did they get that way?
The vowels are all named after their long forms. In Middle English, these were roughly ah, ay (as in “may”), ee, oh, oo (as in “tool”). But the “Great Vowel Shift” scrambled the long vowels of English over several centuries, starting roughly in 1400. This made English vowels sound different from those in Europe, and changed the letters’ names with them, to ay, ee, aye, oh. U was still called oo after the Great Vowel shift; around 1600 it started being called yoo. The Oxford English Dictionary says of wy, also known as Y, merely that the name is of “obscure origin”. It is at least 500 years old.