Both the Greek word for angels, aggelos (Strong's Concordance #G32) and the Hebrew word malak (Strong's #H4397) mean "messenger." These two words reveal a key reason why they exist.
Angels were created to be messengers between God and humans or between him and those spirits who became evil or demons (Isaiah 14:12 - 15, Ezekiel 28:11 - 19, etc.).
Purpose
Although we do not know exactly when angels began to exist, Scripture tells us they were at the creation of the entire universe.
Where were you (God speaking to Job) when I laid the foundations of the earth? Declare it, if you have understanding! . . .
On what are the foundations fastened to? Or who laid its cornerstone, when the morning stars (symbolic of angels) sang together and all the sons of God shouted for joy? (Job 38:4, 6 - 7, HBFV).
In the Old Testament, they are used to call Gideon to serve (Judges 6) and to consecrate Samson as a Nazarite while he is still in his mother's womb (Judges 13:3 - 5)! When God called the prophet Ezekiel, he was granted visions of spiritual beings in the sky (see Ezekiel 1).
Angels, in the New Testament, announced the birth of Christ to the shepherds in Bethlehem's fields (Luke 2:8 - 15). The births of John the Baptist (Luke 1:11 - 20) and Jesus (Luke 1:26-38) were announced by them to Zechariah and the Virgin Mary in advance.
Another purpose for angels is to praise God. For instance, the four living creatures at God's throne in heaven are apparently a class or type of angelic being. They have been given a simple but profound job of praising the Eternal on a continuous basis (Revelation 4:8).
Other Functions
Angels also exist in order to help people, especially those who are converted and destined to inherit salvation (Hebrews 1:14, Psalm 91). In one case, they appeared in order to protect the prophet Elisha and his servant (see 2Kings 6:16 - 17). In another situation, God had a righteous spirit being open up a prison's doors in order to free the apostles (Acts 5:18 - 20). God used them to both relay a message and rescue Lot from Sodom (Genesis 19:1 - 22).
Jesus will have both the saints (converted, resurrected Christians) as well as the holy angels with Him when he returns to earth in what is referred to as his Second Coming. The book of 2Thessalonians 1, verses 7 and 8, reveals that those angelic beings who return with Jesus will be used to deal swiftly with those who reject God and who refuse to obey the gospel.
Because the Lord Himself shall descend from heaven with a shout of command, with the voice of an archangel and with the trumpet of God; and the dead in Christ shall rise first . . . (1Thessalonians 4:16, HBFV).
And to you, who are persecuted, rest with us, at the revelation of the Lord Jesus from heaven with His mighty angels, dealing out vengeance with flaming fire upon those who do not know God, and those who do not obey the gospel of our Lord Jesus Christ (2Thessalonians 1:7 - 8, HBFV).
Made to Serve
Why do angels exist? They exist to serve both God and humans. The Bible tells us that their destiny will not be to rule the universe (the new heaven and new earth) for all eternity. That gift, made possible by the sacrifice of Christ, will be given to God's greatest creation, mankind, after our conversion and resurrection!