Since the Nile was worshiped In Egypt as an idol, Yocheved didn't want to put Moshe in, so she left him on the side. Basya came down to purify herself from her father's idols. Hashem saw this and made the basket move to the middle of the river so that Basya would notice it.