Allah is the true owner of the entire universe and everything within it. However, Allah has put this ownership at the disposal of man without disconnecting His own ownership in the least way, as Quranic verses and hadiths tell us, some of which we will mention here:
1- “وَ سَخَّرَ لَکُمْ ما فِی السَّماواتِ وَ ما فِی الْأَرْضِ جَمیعاً مِنْهُ إِنَّ فی ذلِکَ لَآیاتٍ لِقَوْمٍ یَتَفَکَّرُون” (And He has disposed for you[r benefit] whatever is in the heavens and whatever is on the earth; all is from Him. There are indeed signs in that for a people who reflect). In this verse, the words “disposed for you” and “all is from Him” show that he is the true owner of all these things.
2- “وَ لِلَّهِ ما فِی السَّماواتِ وَ ما فِی الْأَرْضِ وَ إِلَى اللَّهِ تُرْجَعُ الْأُمُور” (To Allah belongs whatever is in the heavens and whatever is in the earth, and to Allah all matters are returned).
3- The hadith you mentioned in your question is a hadith that has been said in the interpretation of the verse of khums. After reciting the verse: “وَ اعْلَمُوا أَنَّما غَنِمْتُمْ مِنْ شَیْءٍ فَأَنَّ لِلَّهِ خمُسَهُ وَ لِلرَّسُولِ وَ لِذِی الْقُرْبى” (Know that whatever property you may gain, one fifth belongs to God, the Messenger, the kindred…), Imam Ridha (as) said: Allah (swt) favored the people with his mercy by doing so, because the true owner of the lives, belongings, and other things is only Him, what the people have is only a trust in their hands and these people are only metaphorical owners, not true owners, and what they gain (through work, business , industry, etc.) is in reality ghanimah (and they are not owners of one-fifth of it and must pay it).
What the imam (as) is saying is that just because one is observing his religious duties, he hasn’t done Him a favor and can't think that he has given a portion of his wealth in God’s way, rather, it is the opposite; since everything truly belongs to Him, he is the one favoring us.
4- Abaan bin Taghlib relates: “Imam Sadiq (as) said to me: “Do you think that Allah (swt) gave wealth to those He saw as respected, and didn’t give it to those who weren’t respected in His eyes? Certainly not! All wealth belongs to Allah, and He entrusts people with it.”