Imām Muḥammad ibn Ṣāliḥ al-ʿUthaymīn (d. 1421 AH) said:
The urine of a male child who has not yet begun to eat solid food is purified by sprinkling it with water. By our saying ‘urine’ we exclude faecal matter from this rule. By ‘sprinkling with water’ we mean to sprinkle the place of urine with water without rubbing it or needing to wring out the affected wetted material. The evidence of this is the ḥadīth of ʿĀʾishah (رضي الله عنها) that a child was brought to the Prophet (صلى الله عليه وسلم). This child urinated on his clothes so he called for water. He (صلى الله عليه وسلم) sprinkled the urine with it, but did not wash it.1
[Q]: What is the wisdom behind only wetting the urine of a male infant who has not begun eating solid food, while the urine of a female infant must be washed?
[A]: The wisdom is that the Sunnah has shown us this difference. The Sunnah is sufficient for us in relation to wisdom. For this reason, when ʿĀʾishah (رضي الله عنها) was asked: Why does the menstruating women fast the days she has missed but does not pray the ṣalāh she had missed on those days? She said: “We used to ponder the same issue at the time of the Messenger of Allāh (صلى الله عليه وسلم). However, we were simply ordered to fast the days we missed, but not pray the ṣalāh for those days.”2
Although some scholars have attempted to identify the wisdom behind this ruling. Some of them have said that the wisdom is ease on the mukallaf [one burdened with the responsibility of upholding the legislations of Islām]. As male infants are held frequently, those around them find contentment and love them more than with female infants.3 Also, his urine flows from a narrow hole such that when he urinates, it spreads. So, in consideration of frequent carrying and spatterings of urine from him, there would be an inherent difficulty in washing, so the ruling has been made to be less demanding.
They also reason that he is nourished with milk which is considered mild and less significant than solid food. Considering this, should the male child begin consuming solid food, then his urine must be washed.
While others, like the Ḥanbalī madh`hab, consider this difference to be purely a form of worship.
The faecal matter of this male child must be washed, even if he has not begun eating solid food. Also, the urine of both male and female children who have begun eating solid food must be washed and treated like any other urine.
 Authentic: narrated by al-Bukhārī: 222 and Muslim: 286.
 Authentic: narrated by al-Bukhārī: 321 and Muslim: 335.
 Translator note: The Shaykh is referring to a common behaviour amongst some people. However, this is not an endorsement of favouring a male child over a female child or that it is permissible to show favouritism in action by holding one more than the other. Shaykh ʿAbd al-ʿAzīz ibn Bāz (رحمه الله) said: “It is obligatory upon both fathers and mothers to show equity among their children with regards to everything. The evidence of this is the saying of the Prophet (صلى الله عليه وسلم): “Fear Allāh and show justice to your children.” So a father must show justice in his gifts, his attention, his spending, and his good treatment of his children. Let him be just in all of it to both his sons and daughters. Likewise, this is also obligatory upon the mother. It is obligatory on each one of them. This is because the ḥadīth is general, comprehensive of spending, gifts, and other than that. Also, because not showing equity results in feelings of enmity, hatred and rancour among the children. Thus, its result is most grave. We ask Allāh for guidance on behalf of everyone.” See Fatāwá Nur ʿalá al-Darb 21:375.
Source: Al-Sharḥ al-Mumtiʿ 1: 437-438
Translated by: Riyāḍ al-Kanadī