The Star - 53:48 It is He Who makes rich and makes poor.
Why does Allah make rich or poor?
The Dawn/89:15 "When his Lord gives to man abundantly to test him, he says: "My Lord has been generous to me"."
The Dawn/89:16 "But when his Lord tests him by withholding his sustenance, he says, "My Lord has humiliated me."

The Arabic Letter Sad/38:34 Thus did We test Solomon, and We added material wealth to his kingdom, but he turned wholly (to God).