Frequently, an "Angel of the LORD" will appear in passages throughout the Bible to bring a message to an individual. In these instances, the speech used is always that of God himself. Tradition held that messages came with the full authority, weight, and force of the person who sent it. This messenger was an extension of the originator of the messenger himself, which is why (as Shakespeare said) you "don't shoot the messenger". In fact, the word "Angel" can be and often is translated as "messenger".
The Hebrew and Aramaic Lexicon of the Old Testament defines the Hebrew word מַלְאָךְ as messenger:
מַלְאָךְ: cs. מַלְאַךְ, sf. מַלְאָכוֹ, מַלְאָכִי; pl. מַלְאָכִים, cs. מַלְאֲכֵי, sf. מַלְאָכָיו: — 1. (of men) messenger: of Jacob Gn 32:4, 7 & oft.; ? business agent Is 23:2; — 2. God’s messenger(s), viz. a) prophet(s) Is 44:26, b) priest(s) Ma 2:7 (so hammal˒āk Ec 5:5); c) cosmic: the wind(s) Ps 104:4; — 3. heavenly messenger(s), angel(s): a) sg. Gn 48:16, mal˒ākô Gn 24:7; b) pl. Gn 19:1; c) spec. uses: mal˒ak habberît Ma 3:1 ϝ berît III 10; hammal˒āk hammašḥît bā˓ām 2S 24:16 & sim. expr., mal˒akê māwet Pr 16:14; d) oft. mal˒ak ˒elōhîm Gn 21:17, mal˒ak yhwh Gn 16:7.
Interestingly, our word for missions "Evangelism" derives from the Latin Evangelium - itself a derivation of the greek word for messenger/angel.
Messengers had a well-established tradition around them and in England for example, killing a town crier who was delivering a decree from a King (for example) could result in charges of treason since he came in the King's authority and was acting under official duty. As such, harming the crier (messenger) was an affront to the King himself which was treason. The BBC states,
Historically, town criers were the original newsmen, bringing the news to the people and acting as spokesmen for the King. Town criers were protected by law and "don't shoot the messenger" was a very real command. Anything that was done to a town crier was deemed to be done to the King and was seen as treason.
This tradition extended back much further and applied even to the divine realm. According to Canaan and Israel in Antiquity by Dr. Kurt L. Noll,
The divine realm, or pantheon, presupposed by ancient Near Eastern kings mirrored the hierarchy of the human social and political world. ... Many gods were messengers. The role of divine messenger was essential because ancient patron gods did not have cell phones or email. In the greek language, a messenger is called an angelos, which is translated into English as an 'angel'. Although later Christian doctrine tried to demote angels from the status of gods by claiming that angels had been created by the Christian god in reality an angel or divine messenger was a common minor god in every ancient Near Eastern religion, including Judaism and earliest Christianity. Some early Christians even identified Jesus as an angel of their god.
In the Iliad and Oddesy, quite a bit of messaging occurs. In Between Orality and Luteracy: Communication and Adaptation in Antiquity Dr. Jonathan L. Ready discusses this classic work stating,
...Homer's gods and mortals both transmit messages via messengers...Although Zeus's worry about a false messenger reveals some anxiety about these agents, Homeric characters generally trust messengers to pass on messages faithfully. This confidence reflects the characters' view that with power comes the ability to control another's action and speech.
In John Durham's commentary on Exodus, he notes
he messenger of Yahweh, מַלְאַךְ יהוה, is not an “angel” in the sense in which “angel” is now generally understood. As often in the OT (Gen 18, Judg 6), there is in this passage a fluid interchange between symbol, representative, and God himself.
A similar scene to that of Exodus 3:2 occurs in Revelation 22:8-16. In verse 8-9 it states that John
threw [himself] down to worship at the feet of the angel who was showing them to me. But he said to [John], “Do not do this! I am a fellow servant with you and with your brothers the prophets, and with those who obey the words of this book. Worship God!”
Yet only a few verses later in 12 and 13, the Angel says
(Look! I am coming soon, and my reward is with me to pay each one according to what he has done! I am the Alpha and the Omega, the first and the last, the beginning and the end!)
So an Angel of the LORD appearing and speaking as God is not an altogether uncommon occurrence. There are numerous other examples, but in short, It is God speaking, but through his vessel, his messenger, the Angel of the LORD who is delivering the message to Moses.
Thus, when the messenger states that he is the LORD and that he is God, the messenger is not making a claim, he is simply reciting and delivering the message. This makes sense in terms of messaging in antiquity in which the messenger would read a letter or recite a memorized speech which would often be from the first person perspective of the messages' author. We are not to understand that the angel/messenger himself is God, but that the one who spoke the message is God. This is why the angel/messenger refuses worship in the passage in Revelation - it is inappropriate to worship him because he is not God, merely his messenger.
The same would be true of an earthly messenger - the audience members would understand that the messenger was not the king himself - though he might state that he is while discharging his duties (reading the message) - but merely that he comes with the authority of and under the direction of the king.