Allah, the Most High, says:
Mothers may nurse [i.e., breastfeed] their children two complete years for whoever wishes to complete the nursing [period].
[Soorah al-Baqarah (2): 233]
Shaykh Muhammad Saalih al-‘Uthaymeen [d. 1420 A.H.], may Allah have mercy on him, said:
The wisdom behind a mother breastfeeding her child herself is that her milk contains benefits for her child that other women’s milk would not. Also, breastfeeding her child brings about affection, love and mercy towards the child. This is because the child is under her care, nursing from her breast, and she obliges to nurse; so, [you find] that the mother finds joy in this [as well]. Therefore, it is from wisdom that the mother breastfeeds her child herself.
Source: Rulings from the Quran, 2/235