It is very odd that Moses would ask in Exodus 3:14,
“If I go to the Israelites and tell them, ‘The God of your fathers has
sent me to you,’ and they ask me, ‘What is his name?’—what should I
say to them?”
Considering that Moses probably knew which God he was speaking to based on the previous statements in the exchange in verse 6
“I am the God of your father, the God of Abraham, the God of
Isaac, and the God of Jacob.” Then Moses hid his face, because he was
afraid to look at God.
It is doubtful that Moses would not know who the God of the Hebrews was having lived among them for so long. He was even raised by his own mother for several years according to Exodus 2:
7 Then his sister said to Pharaoh’s daughter, “Shall I go and get a
nursing woman for you from the Hebrews, so that she may nurse the
child for you?” 8 Pharaoh’s daughter said to her, “Yes, do so.” So the
young girl went and got the child’s mother. 9 Pharaoh’s daughter said
to her, “Take this child and nurse him for me, and I will pay your
wages.” So the woman took the child and nursed him.
10 When the child grew older she brought him to Pharaoh’s daughter,
and he became her son. She named him Moses, saying, “Because I drew
him from the water.”
Undoubtedly, he would have know who he had spoken to. So, why did Moses pose this question? The answer is best illustrated in the form of a legend about the Egyptian god and goddess Ra and Isis. In this legend, Ra becomes injured, and Isis uses this fact as leverage to learn the divine name of Ra. Isis tells Ra that she could only heal him if she knew his secret name. Isis immediately cured Ra, but he could not take back the power that he had granted her by telling her his true name and from that point on Isis was equal even to the sun god in power.
It was believed in most mesopotamian cultures in antiquity that a god's true divine name contained power and that by learning that divine name an individual could control a god and gain power over that god. Therefore, most ancient spells spells and incantations involved some wording along the lines of "By the name of [divine name] I command [action]" - because it was believed that this lent the spell power. For example, on page 124 of Jewish Aramaic Curse texts from Late-Antique Mesopotamia by Dan Levene we see a spell in which the canter is instructed to use the name of Hadriel and Shakniel to silence "evil and violent people who stand gainst Berik-Yeheba son of Mama"
In the name of Hadriel, Shakniel, the well, the stone, and the pit, I adjure, I adjure you, in the name of he who is great and frightful, that you may silence from Berik-Yehaba son of Mama the mouth of all the people who write books, who sit in forts, who sit in market places and in streets, and who go out on the roads.
Another on page 46 seems to utilize as many names as possible as a power-enhancement tactic for the spell
I have adjured you by the holy angels, and by the name of Metatron the pure angel, Nidrel and Nuriel and Huriel and Sasgabiel and Hapkiel and Mehapkiel, shose seven angels that are going adn overturning the heavens and the earth and the stars and the zodiac signs and the moon and Plaedes. May you go and overturn evil sorceries and powerful magical acts...
This is also why Jews do not speak or write the name Yahweh to this day - it is a sign of respect, but few realize that this is the reason why. It would be disrespectful to speak this divine name in any attempt to control the one true God.
This then allows us to better understand why God does not use the actual Tetragramaton when responding to Moses in Exodus 3:14. Moses clearly knows whom he is speaking to, but is fishing for God's divine name. Instead of giving it, God answers with a name similar to his actual name in much the same way Ra answers Isis with his lesser names (notice God's answer is only one letter of difference from the spelling of Yahweh). Instead of giving his name, God responds by saying (as Dick Harfield noted in his answer) "I am who I am and I will be what I will be." With this one pithy response, God has both answered Moses and signaled to him that he will not be controlled by any mere mortal and that no use of his Divine Name will control him.