In his commentary on Genesis 25:1, Richard Elliott Friedman writes:
It's a lovely etiological myth, and the "old rabbinic idea" is, in my opinion, an even lovelier bit of midrash that instills in the tale a story of reconciliation.
25:1 Keturah. The most ignored person in the Torah. Rashi follows an old rabbinic idea that she is Hagar. But there is no basis for this in the text, and other traditional commentators reject it (Ibn Ezra, Rambam, Rashbam). Keturah is the mother of the tribes located along the route of incense trade, and her name is related to the word for incense. Notably, the Midianites are among the children of Abraham and Keturah, and the influence of the Midianite priest Jethro on Moses, his son-in-law, is understood to be substantial. And the line of Levites who are descended from Moses thus -- alone among the Isralites -- derive from Abraham through both Sarah and Keturah. [ source ]
It's a lovely etiological myth, and the "old rabbinic idea" is, in my opinion, an even lovelier bit of midrash that instills in the tale a story of reconciliation.