2 Samuel 7:16 is a promise from God to King David. "And your house and your kingdom shall be made sure forever before me. Your throne shall be established forever." Thus, God promised a King will be born from the line of David, and this King will reign forever!
When the angel told Mary she would give birth to the Son of God, the angel testified that Jesus would be the heir to this Davidic promise: "And behold, you will conceive in your womb and bear a son, and you shall call his name Jesus. He will be great and will be called the Son of the Most High. And the Lord God will give to him the throne of his father David, and he will reign over the house of Jacob forever, and of his kingdom there will be no end." Luke 1:31-33.
Jesus was called the son of David to identify Him as the promised King of Israel.