Q. Why does the verse Migdol yeshu’ot malko (“God is a tower of strength to His king”) end the Shabbat Grace After Meals, whereas the weekday version ends Magdil (“He gives great salvation to His king”)?
A. Migdol is from II Samuel 22; Magdil is from Psalm 18. There is a theory that the two versions in the bensching are the fault of the printers who wrote Magdil but put in the margin “BSB Migdol”, which meant “In II Samuel – Migdol“, though people misread this as “B’Shabbat – on Sabbath – Migdol“.
The theory is wrong because before printing was invented, David Abudarham in the 14th century said his teachers already knew of the two versions being allocated to different occasions.
It may be that the Psalm version was chosen for more frequent use – on weekdays – since this version is probably more grammatical, and the alternative was chosen for less frequent occasions, i.e. Shabbat.
A better explanation is that Migdol (“a tower”) has messianic connotations, appropriate for Shabbat since the Talmud says that if all Jews keep two Sabbaths one after the other, the Messiah will immediately come.
* For a detailed analysis of this subject, see Rabbi Apple’s article from the Jewish Bible Quarterly, “Magdil & Migdol – liturgical responses to textual variants”.