"They will leave with substantial wealth" [Lech Lecha 15:14]
The above verse indicates that amassing wealth was one of the purposes of Egyptian exile. For this to be achieved, it was necessary for Yosef to become the ruler of Egypt and gather wealth from all the other lands.
According to chassidic teachings, ''sparks of holiness'' are trapped within the physical world and are released when a Jew takes the object and uses it to perform a mitzvah. Therefore, one of the inner purposes of exile is for the Jew to utilize physical objects in the service of G-d.
Thus, someone who truly desires to cleave to G-d needs to involve himself in the physical performance of mitzvot, for this is also the only way he can fulfill his soul's mission.
Source: Based on Likutei Sichos Lubavitcher Rebbe