Moses from the Jewish legend, Karna from the Vedic text Mahabharata and Sargon of Akkad of Mesapotamia. Why are the stories so similar? Were they developed independently? Did they have a common root?
This is a great question, which, unfortunately, has no definitive answer. When you refer to the similarities between these stories I suppose you are referring to three tropes these have in common: a) a birth under secret circumstances, b) being set adrift on a great river, and c) finding/adoption by a figure of some notability within each specific context, thereby setting the heroic figure on their life’s course.
These elements of each of the heroic figures’ myths are indeed strikingly alike. However, the question of influence between stories like this is notoriously terribly difficult to answer. In the case of Moses and Sargon, there is at least a possible known connection. The myth of Moses’s birth, as we know it, is likely to have arisen during or after a period of heavy involvement of the Assyrians and Babylonians in Israel and Judah. The extant copies of the Sargon myth are likewise dated to this period. Although we know nothing (or close to it) about scribal training in Ancient Israel and Judah, it is plausible that Israelite and Judahite scribes might have become familiar with stories like the Legend of Sargon in the course of their training. It is further plausible that such scribes could have borrowed and reused tropes from such stories in their own mythic compositions, like that of Moses. Scribes within Mesopotamian empires would have necessarily learned the languages of the empires (Neo-Assyrian, and later Neo-Babylonian) of which they were a part. One aspect of this training (of which we know quite a bit more than that in Judah and Israel) would have involved reading and copying their literature, and eventually mimicking it.
Mind you, this is just plausible. It is not possible to definitively conclude that the birth narrative of Moses stems from that of Sargon. Such an argument would depend on many and extensive textual parallels. The different versions of the stories that we have of each lack this. Moreover there is no work to my knowledge that has ever attempted to argue a genetic connection between the birth story of Karna and those of Sargon and Moses. This does not mean that such a connection is impossible. It only means that we lack sufficient evidence to prove it.
Furthermore, arguing for genetic connections between similar ancient myths is no longer in fashion. Many scholars now feel it is more productive to recognize these sorts tropes when we find them, further to investigate how they function in the stories in which they are employed.
So in this case the question would be what does a secret birth, a miraculous discovery, and a fortunate adoption say about these characters and their lives beyond their infancy? What characteristics are implied by such story elements? Why would we find these elements in three such distinct stories? The possible answers to such questions are myriad. But, their answers potentially teach us about myths and the cultures out of which they emerge.