The reason for Tumah:
The rule of Tumah and Taharah is that the higher something is in Kedusha, the more vulnerable it is for Tumah. For example, only A Yid can become Tumah and a corpse of a Yid causes the highest level of Tumah, because of a Yid’s high level in Kedushah. Also, a Kli is not Tamei if it’s broken, and there are many more examples.
The Ohr Hachaim explains it like a vessel that was full of honey and the honey was removed. The vessel will still have some honey on it and it will attract bees. Whereas a vessel that didn’t have honey at all will not attract any bees. So too when a person is Niftar or when there was a Kedusha that went away from a person, the remnants of the Kedushah attract Tumah. (beginning of Parshas Chukas)
ויחר אף אלקים כי הולך הוא
Hashem let Bila’am go on condition that he’ll follow what Hashem tells him to say. If so, why was Hashem angry with him right when he set out on his way? Bila’am, instead of going with the messengers of Balak together, he went by himself and they followed from afar. This is the Derech of drawing upon oneself Tumah, to be separated and not interacting with other people. That’s why it says “כי הולך הוא” that he is going by himself. Hence, from his departure he was already setting himself up for bad.
תמות נפשי מות ישרים
These are the ways of Reshaim; only in the end of their lives, do they want to correct their ways. “And so I’ve seen Reshaim who told me that if they’ll die right after they do Teshuvah, they’ll do Teshuvah, but they didn’t want to conduct a life of righteousness.”
Bila’am eventually had a Tikkun as the Ari Hakadosh says that he was נתגלגל in the donkey of Rebbi Pinchas ben Yair and had a Tikkun.
לא הביט און ביעקב
Even when a Yid does something wrong it’s not a permanent blemish, it’s just like dirt that can be washed off.
ולא ראה עמל בישראל
The Avodas Hashem and Torah of a Yid is without עמל (is not laborious), but as someone who is earning greatly from it and enjoying it.
Another explanation of this Passuk – לא הביט און ביעקב ולא ראה עמל בישראל:
The ב means because of. Hashem sees the world as good because of the Yidden and sends Shefa to the whole world because of the Yidden.