The sages say: He wrought with them for His name's sake, viz. (Isaiah 48:11) "For My sake, for My sake shall I do, etc." And (Ibid. 63:12) "He split the sea before them." Why? (Ibid.) "To make Himself an eternal name."
It Was Not Primarily for Israel's Sake
Mekhilta Tractate Vayehi Beshalach 4:13