In Eduard Schweizer’s commentary on Matthew, he notes that the four women mentioned in Matthew’s genealogy are all relatively minor:
“It is striking that the familiar matriarchs Sarah, Rebecca, and Leah are omitted, along with other women mentioned in the Old Testament. Matthew singles out the minor women–Tamar, Rahab, Ruth, Bathsheba–those who were not celebrated, to reveal something of the strange righteousness of God, which does not choose what is great in the eyes of men. Even more striking is the mention of Rahab, although the Bible says nothing of her marriage. What do these four women have in common? It might be suggested that all of them, rightly or wrongly, were suspected of adultery…Is this meant to exalt the power of God, who can raise even those of humble or disreputable origin to the positions of the highest honor?…Probably all four are mentioned because they are aliens. Pre-Christian Jewish writings (and possibly Ruth 4:12?) term Tamar an alien; Joshua 2:1; 6:25 do the same for Rahab. Ruth is a Moabite (Ruth 1:44,22 and passim). Bathsheba is not mentioned by name but is introduced as Uriah’s wife because she became an alien through her husband, who always appears in the Bible as “the Hittite” (e.g., 2 Sam. 11:3). If so, the four women are meant to prefigure God’s activity–to culminate in Jesus (28:19)–that will embrace not only the Jews but all gentiles as well.
Of course, Jesus is also a foreigner as well, though admittedly not in the same sense. But what could be more foreign and “other” than a God coming to earth?