She is asking: why does Allah praise Himself?
Question

I am Allah forbid not questioning whats wriiten in Quran but for my own knowledge i wanna know,why Allah praises himself in the Quran and namaz? Allah doesnt need praises from humans,who are we! like in namaz Allah says “Allah listens to that person who praises him” why is that?
Praise be to Allah.Al-Bukhaari (4631) and Muslim (2760) narrated that ‘Abdullah ibn Mas‘ood (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “There is no one to whom praise is more dear than Allah, and because of that He praised Himself. And there is no one whose protective jealousy is greater than Allah’s, and because of that He forbade immoral actions.”
Allah, may He be exalted, has no need of the worlds and their praise and righteous deeds. No matter what bad or good deeds they do, they cannot cause any harm to reach Allah, and they cannot cause any benefit to reach Him. He, may He be glorified and exalted, has no need of them, but they are in need of Him, as He, may He be exalted, says (interpretation of the meaning):
“O mankind! it is you who stand in need of Allah, but Allah is Rich (Free of all wants and needs), Worthy of all praise”
[Faatir 35:15].
But Allah, may He be exalted, loves for His slaves to obey Him, think positively of Him and give thanks to Him, and not to be ungrateful towards Him, for many great and wise reasons, of which we will mention some here:
·Allah loves praise, so He praised Himself and commanded His slaves to praise Him, because He is deserving of that. So He loves His slaves to describe Him as He deserves to be described, because if they do that, that will protect them from attributing to Him bad things that are not befitting to Him at all
·Praising and extolling Him as He deserves is establishing the truth and acting upon it. Thus justice is established in the heavens and on earth; in contrast, if they show ingratitude towards Him and do not give thanks to Him, they will not be able to establish justice among themselves
·Praising and extolling Him is in people’s best interests in this world and in the hereafter. An-Nawawi (may Allah have mercy on him) said in his commentary on the hadith quoted above:
in fact this is in people’s best interests, because they praise Him, may He be glorified and exalted, and He rewards them, thus they will benefit, whereas Allah, may He be glorified, has no need of people and their praise does not benefit Him, and if they do not praise Him that does not harm Him.
End quote from Sharh an-Nawawi ‘ala Muslim (17/77).
Al-Mubaarakfoori (may Allah have mercy on him) said in Tuhfat al-Ahwadhi (9/357):
He loves praise so that He may grant reward for that, and thus it benefits the individual; it is not because He benefits from praise. We love praise so that we might benefit and so that we might be held in high esteem among our people. Thus it is clear that the common folk are mistaken when they say, “If Allah loves praise, why shouldn’t we love it too?” End quote.
·Moreover praising Him is an acknowledgement of His true status. Were it not that He has instructed us to do that, and told us how to do it, we would not have learned what is befitting to His greatness and majesty of praise and glorification, and we would not have come to know our Lord by His beautiful names and sublime attributes. Knowledge of that is the foundation of praise and glorification of Him, and it is the basis on which the slave knows his Lord.
·Praise of Allah, may He be glorified, frees the individual from the characteristics of arrogance, conceit and pride. The one who does not attribute blessings to Allah and praise Him for them will attribute it to himself, and thus he will transgress, and will look down on people, as Qaaroon did when they reminded him of Allah and His Blessings: “He said: ‘This has been given to me only because of knowledge I possess’” [al-Qasas 28:78]. That was because of his conceit towards people and his self-pride. So Allah caused the earth to swallow him up, along with his house. Then Allah, may He be exalted, said (interpretation of the meaning): “That home of the Hereafter (i.e. Paradise), We shall assign to those who rebel not against the truth with pride and oppression in the land nor do mischief by committing crimes. And the good end is for the Muttaqoon (pious)” [al-Qasas 28:83].
·Praising Allah, may He be glorified and exalted, and knowing Him by learning of His perfect attributes opens the door to true servitude to Him, for we cannot do that and come to know Him except by learning the reasons why we should praise Him, which can be achieved by learning His names and attributes that require us to praise and extol Him.
·Praising and extolling Him as He deserves, may He be glorified, opens the door to understanding one’s own condition of weakness, paucity, humility and need. Thus one will attain the status of true servitude to Allah (‘uboodiyyah).
Ibn al-Qayyim (may Allah have mercy on him) said:
Poverty is of two types:
The first type is inherent poverty. This type of poverty is applicable to all and no one is excluded, righteous or evildoer. This does not incur praise or condemnation, reward or punishment; rather it is more like the fact that the created being is created (i.e., it is inherent).
The second type of poverty is voluntary (acknowledging one’s helplessness), which is the result of two noble types of knowledge: the slave’s knowledge of his Lord and his knowledge of himself.
When he attains these two types of knowledge, they lead him to a type of poverty (acknowledgement of his helplessness) which in fact is the true essence of strength and happiness.
End quote from Tareeq al-Hijratayn (p. 9)
However we say:
It is not appropriate to raise this question in the first place, because it is contrary to the concept of trial and accountability. Therefore there is no shar‘i or rational basis for this question. If it is right to ask, “Why does Allah praise Himself and instruct His creation to praise Him, even though he has no need of them?” then it would be right to ask “Why does he instruct them to pray, fast, perform Hajj, remember Him (dhikr), and read Qur’an? Is He not in no need of that?!” Just as He, may He be glorified, has no need of people’s praise, He also has no need of their prayer, fasting or any other acts of worship. So the individual should focus on obeying Allah and worshipping Him on the basis of surrender, certainty and contentment. Allah, may He be exalted, says in the famous hadith qudsi:
“O My slaves, you can never do Me any harm or bring Me any benefit. O My slaves, if the  first of you and the last of you, your humans and your jinn, were equal in piety like the heart of the most pious man among you, that would not add anything to My dominion.”
And Allah knows best.