In many of the ancient literatures, one could see a man of significance born in secret or out of wedlock, where the mother had to dispose of the child out of shame or disgrace. But they didn't want to kill the child instead they fashioned a reed basket and filled it with grass or some soft materials and put the child in and floaedt it in a river hoping that the child would be rescued by someone else.
Gilgamesh Story.
Gilgamesh is the oldest of all stories written by mankind about 12000 BCE. In it, a child was born to a priestess out of wedlock around 2200BCE. Out of shame and fear for her life the priestess made a reed basket and put the child in it and set adrift on the Euphrates. This was child was recovered by a low -class gardener of the king. The gardener raised the child in secret. In due course this child became a brilliant archer and became the cupbearer of king of Kish, Ur-Zababa. He eventually overthrew the king and became the king himself establishing his own city in Akkad. By conquering and subduing the other Sumerian cities like Ur and Uruk he established the first Akkadian empire.
The Old Testament Story.
Moses was born in secret during the time of the Roman persecution of the Jews. The King's order was to kill all newborn Jewish babies. Mosses' mother fashioned a reed basket and filled it with soft clothes and put the child in it and floated in the Nile. Downstream, when Pharoah's daughter was in dallying water sports spotted the basked and an alive child. She rescued the child and took him to the palace where he grew up as a prince and later, he led the Jewish people to freedom from the Egyptian bondage.
Indian Epic of Mahabharatha.
In the Indian epic Kunthi the mother of the first three Pandavas had gained a few boons from some heavenly characters like the sun god Indra. From Indra a virgin Kunti gained a child impregnated on her thigh. In due course a brilliant child was bone to Kunti. Out of shame that the child was born out of wedlock, she fashioned a reed basket and filled it with soft clothes and floated the illuminating child in the river Yamuna. Downstream a low- class charioteer rescued the child and raised him as a low- class warrior. In due course Karnan will rise as a magnificent warrior in the Kauravas side. In the final Armageddon- the Kurukshetra war- Karnan fought as a valiant warrior and got killed by trickery of God Krishna.