(Numbers 22:20:) "ARISE, GO WITH THEM." Once he had grown brazen, as it is said (Numbers 22:22), "And the anger of God was kindled because he was going," the Holy One, blessed be He, said: Wicked one! I have no desire for the death of the wicked. Since you wish to be lost from the world, "Arise, go with them."
Why God Let the Defiant Balaam Go With Balak's Princes
Midrash Tanchuma Buber, Balak 11:3
קום לך אתם (במדבר שם כ). כיון שהעיז פניו, שנאמר ויחר אף אלהים כי הולך הוא (שם שם כב), אמר הקב"ה רשע איני חפץ במיתתן של רשעים, הואיל ואתה רוצה ליאבד מן העולם, קום לך אתם.