The Midrash and Zohar seem to struggle with understanding why Megillat Ruth was even written.The family of Dovid Hamelech merges with Amon and Moav and the results seem disastrous.SourcesMidrash Rabba Ruth Parsha 2 Perek 14Zohar Chodosh on Megillat Ruth Chapter 31 Part 1Megillat Ruth Perek 4 Pesukim 1 - 6Commentery of Rashi on Pesukim 1 and 6Gemara Chagiga Daf 4 BGemara Brochas 31 BCommentery of Tosfos 4 B ‘D’leika Milsa…’Commentery of Mishbetzos Zohov on Megillat Ruth Chapter 4 Possuk 6. (Page 117)Leshem Shvo V’achlama Hakdamos U’Shearim Shaar Haponeh Kodim Perek 41 ‘V’Zehu Sod’Gemara Sanhedrin 101 B Rashi Nismachmech B’BinyanGemara Sanhedrin 110 B