Foiling Bilam Preserves Redemption
בלשון הפסוק העם היוצא ממצרים כי בלעם הי' מיועצי פרעה לשעבד עם בנ"י ורצה גם עתה בנחשיו להחזיר אותם למצרים
In the language of the pasuk, "the people that has come out of Mitzrayim" (Bamidbar 22:5) — for Bilam was among Pharaoh's advisors who counseled to enslave Bnei Yisrael, and now too he wished, through his sorcery, to return them to Mitzrayim.
The pasuk's phrasing "the people that has come out of Mitzrayim" hints at Bilam's history: he had advised Pharaoh to enslave Bnei Yisrael, and now he aimed through his sorcery to undo the redemption and send them back.
לכן אמר היוצא כי עדיין לא נגמר יציאתם
Therefore he said "that has come out" — implying that their leaving was not yet complete.
By saying "that has come out" rather than "that came out," Bilam implied the Exodus was still in progress and thus could yet be reversed.
וכן מצאתי בזוהר דבעא לאתבא לון למצרים ע"ש
And so I found in the Zohar that he sought to bring them back to Mitzrayim; see there.
The Sfas Emes brings support from the Zohar, which states that Bilam's goal was to return Bnei Yisrael to Mitzrayim.
ולכן מזכיר בכל הברכות אל מוציאם ממצרים כי ראה שאינו יכול כלום ליגע בחירות שהוציאנו הקב"ה ממצרים
And therefore in all of his blessings he mentions "Keil, who brings them out of Mitzrayim" (Bamidbar 23:22), for he saw that he was utterly unable to touch the freedom with which the Holy One, Blessed is He, brought us out of Mitzrayim.
In his every attempt at a curse, Bilam was forced to acknowledge Hashem as the One who brings them out of Mitzrayim, because he saw he could not touch the freedom granted by the Holy One, Blessed is He.
ולכן אמרו שביקשו לקבוע פ' בלק בק"ש
And therefore Chazal said that they wished to establish Parshas Balak within Krias Shema.
Because Bilam's scheme was a renewed assault on the very freedom of Yetzias Mitzrayim, Chazal wished to fix the parsha of Balak as part of Krias Shema.
וכ"כ עמי זכר נא כו' כמו שמצוה לזכור יציאת מצרים בכל יום כן יש לזכור בחסד ה' שעשה עמנו להפר עצת בלעם הרשע:
And this is what is meant by "My people, remember now [what Balak king of Moav plotted]" (Michah 6:5) — just as one is commanded to remember Yetzias Mitzrayim every day, so too one ought to remember the chesed of Hashem that He did with us in nullifying the counsel of Bilam the wicked.
The pasuk in Michah teaches that just as we must recall Yetzias Mitzrayim daily, so too we should remember the chesed of Hashem in foiling the wicked counsel of Bilam, for it was a defense of that same redemption.
Summary: The Sfas Emes explains that the Torah's phrase "the people that has come out of Mitzrayim" reveals Bilam's true aim: having once advised Pharaoh to enslave Bnei Yisrael, he now sought through sorcery to reverse the redemption and return them to Mitzrayim, as the Zohar likewise states. The very word "that has come out" implies that he viewed their leaving as not yet finalized and therefore still undoable. Yet in each of his blessings Bilam was compelled to declare Hashem as the One who brings them out of Mitzrayim, for he recognized he could not touch the freedom the Holy One, Blessed is He, had bestowed. Because his plot was an attack upon Yetzias Mitzrayim itself, Chazal wished to fix Parshas Balak within Krias Shema. From the pasuk in Michah we learn that just as we are commanded to remember Yetzias Mitzrayim daily, so too we must remember the chesed of Hashem in nullifying the wicked counsel of Bilam.