I guess this part is really what I don't get. How can Hashem decide that? Hasn't our law already been decided by Hashem and the sages who interpreted it?
Hashem knows what the future will be, but we still have free choice so we can merit the mitzvas that we do. With the exception of maybe a few prophets, the sages did not and still do not know what the future will bring. This is why certain laws such as how to handle electricity on Shabbat took time to figure out. Certain traditions such as allowing females to study torah have also changed over time.
I fail to understand any parallel with the question of Jews holding office in galut though.
The point is that if there times when no torah law exists for something, but a right and a wrong thing still exist. In most cases the right thing is clear and consistent, however exceptions from the norm may exists where what is usually the wrong thing to do is actually the right thing. Even though Joseph had ruled in Egypt, it was for Hashem and was the right thing in that case.