כִּי֩ מֵֽאַהֲבַ֨ת יְהוָ֜ה אֶתְכֶ֗ם וּמִשָּׁמְר֤וּ אֶת־הַשְּׁבֻעָה֙ אֲשֶׁ֤ר נִשְׁבַּע֙ לַאֲבֹ֣תֵיכֶ֔ם הוֹצִ֧יא יְהוָ֛ה אֶתְכֶ֖ם בְּיָ֣ד חֲזָקָ֑ה וַֽיִּפְדְּךָ֙ מִבֵּ֣ית עֲבָדִ֔ים מִיַּ֖ד פַּרְעֹ֥ה מֶֽלֶךְ־מִצְרָֽיִם׃
но потому что Господь возлюбил вас и за то, что сдержит клятву, которую Он клялся отцам вашим, вывел вас Господь рукою крепкою и выкупил вас из дома рабства, из руки фараона, царя Египетского ,
Rashi
מבית עבדים OUT OF THE HOUSE OF SLAVES — This means, from the house of Pharaoh where ye were slaves to him. Or perhaps it only says “from the house of slaves” in the sense of a house belonging to slaves to that the words imply that they were slaves to slaves (a most abject form of slavery)! But elsewhere it states, (Deuteronomy 7:8) “He redeemed thee from the house of slaves, from the hand of Pharaoh, king of Egypt”, so that you must now admit that they were slaves of the king and not slaves to slaves and the meaning is: from the house where you were slaves (Mekhilta).
Rashi
Because of My knowledge that you are obstinate. Heb. מִדַּעְתִּי. Because I knew you, that you are obstinate, and if the miracle would come and I had not told of it before, you would say, “My idol performed them, and they were not from the Holy One, blessed be He.” Therefore, I told you from then; when it had not yet come to pass etc. מִדַּעְתִּי [although usually translated ‘from My knowledge,’ in this case,] ; the ‘mem’ denotes the giving of a reason, like ‘Because I knew.’ A similar form [is found in Deut. 7:8:], “For, because of the Lord’s love (מֵאַהֲבַת) for you, and because of His observing (וּמִשָּׁמְרוֹ) the oath.”
Ramban
SPEAK NOT THOU IN THY HEART. After cautioning that you should not think ‘my power and the might of my hand hath gotten me this wealth.’119Above, 8:17. but instead you are to know that the power over the vanquished was given to you by G-d, and that [the victory over] their mighty ones and fortified cities that you will have conquered [was made possible by] G-d in His Glory Who did it for you in a generally known miracle from Him, he further warned them, “Do not think that G-d did all this for you because of your righteousness; rather, He has done so for you only because of the wickedness of these nations.”120Verse 5. Now this is a cause for the destruction of these nations, but he gave no reason for Israel’s possession of the Land. Therefore he reverted and explained, Not for thy righteousness120Verse 5. that you will be righteous in conduct, nor even because of the upright heart that you will have, but only because of the wickedness of these nations will they be destroyed, and because of [His] oath to your fathers will you possess the Land, for your sin cannot annul the gift He gave to your fathers since He gave it to them by an oath. And Rashi wrote: “Speak not thou in thy heart — my righteousness and the wickedness of these nations caused me [to possess the Land]. Not for thy righteousness.” But this is not correct.121Rashi explained that they were not to think that a combination of their righteousness and the wickedness of the nations was a cause of one thing — their coming into the possession of the Land. On this Ramban comments that the verses indicate instead that there are two separate warnings here: “Do not think that because of your righteousness you are coming to possess the Land, and do not think that because of the wickedness of these nations they are driven out from it” (Mizrachi).
Now one should ask, “Has he not said, But because the Eternal loved you,122Above, 7:8. thus establishing that they are beloved on high, and, [as we know], G-d loves only those who are good, for the wicked and him that loveth violence His soul hateth,123Psalms 11:5. and if so, [it is justifiable that] they come to possess the Land also for their [own] righteousness [so, how can he say here Not for thy righteousness, etc.]?” The answer is that there he speaks of Israel in general, and here he reproves that particular generation that has been rebellious against the Eternal from the day they were in the wilderness.
Now one should ask, “Has he not said, But because the Eternal loved you,122Above, 7:8. thus establishing that they are beloved on high, and, [as we know], G-d loves only those who are good, for the wicked and him that loveth violence His soul hateth,123Psalms 11:5. and if so, [it is justifiable that] they come to possess the Land also for their [own] righteousness [so, how can he say here Not for thy righteousness, etc.]?” The answer is that there he speaks of Israel in general, and here he reproves that particular generation that has been rebellious against the Eternal from the day they were in the wilderness.