It says in the targum of shir hashirim that 10 times from the beginning of creation there were poems that were said to Hashem. The tenth one will be said by the Jewish people returning from the exile. For witnessing the miracles that Hashem did for them.
There are many sources about saying Shira to Hashem as an expression of gratitude. About Chizkiyahoo Hamelech it is brought down in perek chelek of San hedrin that Hashem wanted to make Chezkiyahoo be Mashiach the angels were criticizing and said Dovid Hamelech who said so many shirot and tishbachot (Songs and Praises) in front of you and you did not make him Mashiach, Chizkiyahoo hamelch that you did for him all those miracles and he did not say Shirah you are going to make him Moshiach.
The Ramban z”l parashas Bo says that when Chazal says “a person always has to be careful in a light mitzvah just as a stringent mitzvah.” That all of them are sweet and loved to a great extent. Any time that a person is thankful to Hashem and then the intention of all of the mitzvoth is that we all believe and have faith in Hashem and be thankful to him that he created us. And that was the original intention of creation. And we do not have another understanding of the first intention of creation. And Hashem does not have another desire in the lower ones except for that. Besides that, a person will know and be grateful to the creator that created him. And by singing prayers with full intention. This is also the principle of the bies keneset the merit of coming together the whole congregation to join together to give thanks to their creator who brought them to be able to publicize Hashem/ to say in front of Hashem we are your creation, this is the intention of the sages that said on the pasuk “and they called to Hashem strongly” from here we learn that prayer needs a strong voice.
In Pirkei de Rabbi Eliezer it says the following “before the world was created, Hashem made the Torah to create with it the world. The Torah said in from of Hashem Master of the universe if there is no army to the King what is he a king upon? If there is no nation that glorifies the King were is the honor of the King. Hashem heard those words and he was pleased with it. “
We see from these sources is that the whole reason for the creation is that the creation will be grateful to the creator “and all Hashem created for his honor.” And it says” it is all called with my name and for my honer I created, and for forming “
The Midrash on the pasuk Chadashim labakrim raba emunatecha, we learn from there that Hashem is creating new angles every day that say Shira in front of him before returning to Nahar Dinur (river). That is what we say every day in Shacharit before kriyas Shema yaotzer mishartim. Which are the new angles that serve in front of Hashem every day?
It says in Chazal the whole world was created for Dovid Hamelech, who is called zmirot Yisrael and he said praises and songs in front of Hashem more than all the other people of the world. Dovid HaMelech said I am not proud and not for the pride I am saying so rather my intentions is that all of the nations will hear and be joyful for my intention to praise and glorify you. What is said in Tehillim gadlu Hshem iti uneromema shmo yachdav”
It says in the future to come to Hashem will do a feast for the tzadikim, they will bring cos shel bracha in front of Avraham Avinu and he will say I can not bless because Ishmael came out of me Itzcha will say I can not bless because Eisave came out of me Yakov will say I can not bless because I married 2 sisters, Moshe Rabenu will say I can not bless because I did not come into Eretz Yisrael until they reach Dovid Hamelech and he says I will mezamin bless and for me, it is proper to bless. The reason being that Dovid Hamelch was blessing Hashem when he was alive in this world. And no one said praises to Hashem like him, and also it is the biggest glory of a King to be praised by a King. It says about Melech ha Mashiach like a spring that brings out new water every day so to Melech Hamashich will say a new shira every day. And the reason being is that the miracles of the future redemptions will be bigger than the miracles of leaving Egypt.
Masechet Brachot chapter one it says” when am Israel collect in the beit keenest and beit midrash and say together Amen yehe shemey raba mevorach Hashem shakes his head and says happy should be the king that gets praised within his house and what would be with the father that sent his children to exile between the nations and oy for the children that were dispersed from the table of their father. And rashi explains happy should be the King is talking about when this praise was said in beis hamikdash, and the Ein Yakov learns that what Rasih means to say that the whole reason for the exile is because they did not say praises and shira in front of Hashem. And this is also what Moshe rabeinu hints to us in the Torah Tachacht asher lo avadeta et Hashem Elokecha be tuv levav ve simcha” and Chazal in the second chapter of masechet arachim says what is the avodah of simcha and tuvlevav?this is shira. That is while Am Yisrael is in exile and says, Kadish, it reminds Hashem, when this praise was said in the Beis HaMikdash.
The majority of this article was taken from on the book Devrie Emet of Rabbi Itzchak ben Dovid for the city of Kushta.