Allaah (The Most High) said:
وَأَوۡحَيۡنَآ إِلَىٰٓ أُمِّ مُوسَىٰٓ أَنۡ أَرۡضِعِيهِۖ فَإِذَا خِفۡتِ عَلَيۡهِ فَأَلۡقِيهِ فِى ٱلۡيَمِّ وَلَا تَخَافِى وَلَا تَحۡزَنِىٓۖ إِنَّا رَآدُّوهُ إِلَيۡكِ وَجَاعِلُوهُ مِنَ ٱلۡمُرۡسَلِينَ
فَٱلۡتَقَطَهُ ۥۤ ءَالُ فِرۡعَوۡنَ لِيَڪُونَ لَهُمۡ عَدُوًّ۬ا وَحَزَنًاۗ إِنَّ فِرۡعَوۡنَ وَهَـٰمَـٰنَ وَجُنُودَهُمَا ڪَانُواْ خَـٰطِـِٔينَ
”And We inspired the mother of Musa (Moses), (saying): “Suckle him [Musa (Moses)], but when you fear for him, then cast him into the river and fear not, nor grieve. Verily! We shall bring him back to you, and shall make him one of (Our) Messengers. Then the household of Fir’aun (Pharaoh) picked him up, that he might become for them an enemy and a (cause of) grief. Verily! Fir’aun (Pharaoh), Haman and their hosts were sinners.” [28:7-8]
That is: The end result and final outcome of picking up Moosa was that he would be an enemy of theirs and a cause of grief that was to grief them. Because what they feared (i.e. that they were to be destroyed at the hands of a man from Bani israa’eel) did not benefit them due to what Allaah has decreed. And that the one they feared amongst Bani Israa’eel (i.e. Moosaa) had been destined to be a leader of theirs, who was to be nurtured by them, under their eyes and guardianship.
[إِنَّ فِرۡعَوۡنَ وَهَـٰمَـٰنَ وَجُنُودَهُمَا ڪَانُواْ خَـٰطِـِٔين -Verily! Fir’aun (Pharaoh), Haman and their hosts were sinners]; so We wished to punish them for their sins and planned for them a recompense for their (evil) plots and plans.
Imaam Sadi (rahimahullaah) also said: And from the usual ways of Allaah (The Most High) is that He causes affairs to appear gradually—little by little—and not just at once.
[Abridged and slightly paraphrased…For further details, see Tayseer Al-Kareem Ar-Rahmaan Fee Tafseer Kalaam al-Mannaan]