Were Yisrael more righteous when the Beis Hamikdash was standing?
(24,5) “How goodly are your tents, Ya’akov, your dwellings, Yisrael!”
Behold, in this posuk the Jewish nation is referred to first as Ya’akov and then as Yisrael. And the Beis Hamikdash is referred to first as a tent and then as a משכן (a dwelling).
But the gemora teaches that when Yisrael do the will of Hashem they are called Yisrael, and when they do not obey Hashem’s will they are called Ya’akov. And it says in the Midrash that when the Beis Hamikdash was standing it was called a tent, and when it was destroyed it was called a משכן, which means both a dwelling and a collateral, because the Beis Hamikdash was taken as collateral when it was destroyed for Yisrael’s sins, as Rashi writes in the beginning of parshas Pekudei. The Midrash also teaches that as long as the Beis Hamikdash was standing the generation was called wicked, but when it was destroyed they became Tzaddikim.
Thus Bilaam was saying to Yisrael: “How goodly are your tents, Ya’akov” - when the Beis Hamikdash is called a tent - when it is standing, it is good, but you are called Ya’akov because you are wicked; “your dwellings, Yisrael” - but when the Beis Hamikdash is destroyed and called by a name which means collateral you are called Yisrael, because then you do the will of Hashem and are thus Tzaddikim.