When we read the story of Ruth, it seems as if Elimelech’s family was sent by God to Moab just for the sake of Ruth. We don’t know much about the ancestry of Ruth in Moab but she became an ancestor in the genealogy of Jesus Christ.
Why did God destroy Elimelech’s Family?
Salmon begot Boaz by Rahab, Boaz begot Obed by Ruth, Obed begot Jesse, and Jesse begot David the king. David the king begot Solomon by her [who had been the wife] of Uriah.Matt 1:5-6
Elimelech’s family was completely destroyed. His two sons died in Moab. Matthew mentions Uriah’s name in the genealogy of Jesus while Bathsheba was missed out. This is completely in contrast to Ruth being mentioned while Elimelech’s son, Mahlon’s name was missed out.
But King Solomon loved many foreign women, as well as the daughter of Pharaoh: women of the Moabites, Ammonites, Edomites, Sidonians, [and] Hittites– from the nations of whom the LORD had said to the children of Israel, “You shall not intermarry with them, nor they with you. Surely they will turn away your hearts after their gods.” Solomon clung to these in love.1 Kgs 11:1-2
We can see how Solomon disobeyed the commandment of God through law of Moses to not intermarry.
Nor shall you make marriages with them. You shall not give your daughter to their son, nor take their daughter for your son. For they will turn your sons away from following Me, to serve other gods; so the anger of the LORD will be aroused against you and destroy you suddenly.Deut 7:3-4
We can clearly read this in the law as well.
.. if indeed you do go back, and cling to the remnant of these nations–these that remain among you–and make marriages with them, and go in to them and they to you, know for certain that the LORD your God will no longer drive out these nations from before you. But they shall be snares and traps to you, and scourges on your sides and thorns in your eyes, until you perish from this good land which the LORD your God has given you.Josh 23:12-13
Joshua also repeated the same law as a warning based on the incident with women of Moab mentioned in Num 25:1-8. Undoubtedly, God destroyed the family of Elimelech for his disobedience of clinging to Moab and giving his sons in marriage to Moabite women. Naomi herself confesses that the LORD was indeed against her (Ruth 1:13, 21).
Why God choose Ruth?
But Ruth said: “Entreat me not to leave you, [Or to] turn back from following after you; For wherever you go, I will go; And wherever you lodge, I will lodge; Your people [shall be] my people, And your God, my God.Ruth 1:16
While Elimelech clung to Moab and gave his sons in marriage to Moabite women, Ruth who is a Moabite clung to Israel and the God of Israel.
you shall not bow down to them nor serve them. For I, the LORD your God, [am] a jealous God, visiting the iniquity of the fathers upon the children to the third and fourth [generations] of those who hate Me, but showing mercy to thousands, to those who love Me and keep My commandments.Exod 20:5-6
The LORD is merciful to anyone who loves Him and keep His commandments. This is exactly what happened to Ruth. The LORD rewarded Ruth since she came to the LORD for refuge under His wings as Boaz blessed (Ruth 2:12).
Elimelech chose the world for refuge during famine while Ruth chose the God of Israel for refuge. Just as Elimelech must have kept the law of Moses and not clung to Moab and given his sons in marriage to Moabite women, we too must obey the teachings of Jesus and not cling to the world during our difficult situations. Just as Ruth, who was a Moabite, left Moab and came to the God of Israel for refuge, we too must leave the world behind and come to Jesus who will give us rest. As in James 4:4, anyone who wants to be a friend of this world makes himself an enemy of God.